When you are applying your own template you will need to match up the editable regions of your template with the regions of the page. You mentioned:
When you say that it did now work what is the result that you got? This is the correct way to apply the editable regions of the template so it you should get a good result. The error are you getting about the function being undefined is probably because the code that includes the file this function is defined in is not present. The includes should all be at the top of the page above any of the html. When I view the contact page you posted there is no line 101, it only goes to line 93.
You could manually create a new page from the template then cut and past the individual sections of the page into your new page.