Part 7.2: How to link your homepage to the template
In the last section we’ve been working on the new template file – your original “index.html” file is not linked to the template, so at the moment any changes made to the template file won’t be updated in the index page itself. All this is covered in our comprehensive Dreamweaver training course in Brighton, Sussex.
So essentially we need to re-make the index.html page, using the new template as a starting point.
To do this:
1: Close all of the pages you have open (if you have lots of pages open, the fastest way to do that is by selecting File > Close All from the main menu
2: Select File > New. Instead of creating a brand new HTML page, this time select “Page from Template” from the left-hand column.
3: The name of your site will appear in the second column from the left, and your new “index.dwt” template will appear in the last column.
4: Select the index template and ensuring that the “Update page when template changes” box is checked, click “create”
5: A new page will appear – this will be identical to the template (and therefore identical to the original index page you made the template from).
6: Select File > Save As. Select the existing index.html page and then press “Save” – this will save over the original index.html page, so select Yes when Dreamweaver warns you that this is happening
Your index page will now be linked to the template, so any changes you make to the template will be reflected on your homepage.
What’s more, you now have a template from which you can create all of the other pages your website will need.
Once you have mastered all these techniques you may want to attend our Advanced Dreamweaver training course.