This post is a follow-up to Adventures in Making Templates: Part I.
In previous posts, I’ve discussed the history of our digital webpages, and the issues I had creating my first templates. I also discussed how to create an initial template page. Now, let’s turn to creating a new page using a template and additional points to keep in mind. To create a new page using a template:
- Open Dreamweaver, if not already opened. [I use Dreamweaver CS6.]
- To create a page from a template: File—>New… —>Select Page From Template, then navigate to the template page you created.
Click Create button.
You will notice all your “locked in” code — code that will stay consistent on all pages — is grayed out. You will not be able to edit this area at all on this page. Go on. Try it. Select a section and try to delete it. Can’t. Be. Done. You can select it; but you can’t edit it in any way. However, the areas that are shown in blue or black text are editable areas. So, at the top, you see where I can change my meta content and name, plus page title.
You also have to be aware that not all areas are obvious as being editable. This is where you need to be aware of your code.
This whole area marked in gray (highlighted here, with text below image) is actually editable space:
<!– InstanceBeginEditable name=”additional styles go here” –>
<!–<link rel=”stylesheet” type=”text/css” href=”../cdm/css/reset.css”>–>
<!–additional style types go here–>
<!–additional css links go here–>
<!– InstanceEndEditable –>
Below is an example of code that I placed inside one of these areas:
Further on down the page is the space for the inside content, followed by the non-editable footer.
It’s pretty easy to go from there. Once you have the page created, save with the actual name you plan to use and you’re set!
Here’s a comparison between our old (non-template) page on the left, and new page (created with template) on the right:
As you can see, there are subtle differences between the old and new pages. Here’s another example of a longer page:
One of my main issues without using a template was the variety of space between the end of text and the footer. This was a browser issues: some browsers played nice, and others didn’t. Using a template took this issue away. Our pages are now consistent whatever browser one chooses. Having the template also made it easier for me to add elements that were lacking on every page, like the social media icons.
Templates are great when you have several pages to maintain that all have the same basic layout. They are not for all sites/layouts, but work well for web masters who have many pages with certain elements that need regular updates. I’ve had templates on my radar since I first started working on my pages. I am glad I finally learned how to create them. You may find them useful too.