Reader Question: What is the benefit of using a template?
What is the benefit to creating templates in Dreamweaver to build your site? Is that what most people do if each page is going to have the same layout? Is there a downside to using a template for each page?
My Thoughts
Dreamweaver uses the term templates to mean pages that are coded to use similar data across the site. They are a form of include. They don't work very well, in my experience, but that's what they are. The benefit to using a Dreamweaver template is that you can create a section of your site once and use it on every page without editing it more than once. This is great for things like navigation and copyright notices. The problem comes if you have anyone else who works on your site with you - the templates are on your local machine, and it's hard to keep them synched even with the check-in options Dreamweaver has. I've also found that they just don't work as well as other include file options.
If I'm going to use includes, I prefer SSI (server side includes) as they were intended for exactly that purpose. If I'm using a PHP site, I'll use PHP for includes, otherwise, I just stick with flat HTML and use search and replace techniques to manage the site. That is my preference.
What do you recommend?
What do you use to template your websites? Do you use any include software or do you build the files manually? What about CMS tools, do you use those to handle includes? Let us know by posting in the comments or answering the post.



Comments
Hi Jennifer,
Even though I haven’t explored enough SSI, I’ve found DW templates not so bad. That’s maybe because I’m the Webmaster of my site, and the only in charge of actually pushing content live. I’ve developed templates, as you mention, to avoid repeating global navigation and common elements on every single page. These templates are versioning-controlled, I provide the contributors with them and they come up with functional html pages. I might give it a try to SSI, I just wonder if they might work for multiple participants team.
Great blog!
When I first discovered Dreamweaver templates I fell in love with them and I still use them for some projects.
But I agree that server side includes are better for collaborations because a surprisingly fair amount of people aren’t all that familiar with using dream weaver templates, and if you’re using a lot of server side scripting then it just makes sense to use server side includes. Another Dreamweaver tool I often use instead of full blown templates are library items which you can create from the access window and then use as needed throughout your site.
CMS are great for sites where html illiterates will be creating and updating a lot of content but I prefer to use them only when necessary.
Another disadvantage to using templates is that if you update the template, you have to reupload every single page. Now, with a 6-10 page site, that’s not a problem. But if the site gets larger, it’s cumbersome and you have to hope you don’t miss any!
I love SSI and use it exclusively for every site. Why repeat something that you can build once and include as needed. Updating is faster and easier - change one file and it all updates.
I have also found that navigation links can be styled differently based on the div you’re using. For example, I am the web designer for our local Chamber website, which is so huge I can’t update it without looking at the site to find the location of the files. In addition to using navigation in the usual places, I created a site map that uses the same files to show where everything is. It is styled much differently, but it works and if I remove or add content, the site map updates too.
I started using SHTML, but have switched mostly to PHP because it seems most sites need some type of script and I prefer all the pages have the same extension. It’s also not a problem if there is no script but you add some later on. It’s “ready to go!”
Luis: I agree, if you are the only one managing the website, DW templates are great. I had problems with them when I implemented them (or tried to, I should say) with a team of 6 people.
I use a combination of DW templates and SSI. Here’s how:
Starting with a plain old HTML file, not a DW template, I build the page exactly as I want it to be — including navigation, common areas like masthead and footer, etc.
Then I yank out all the CONTENT BITS that remain constant throughout the site, and put those bits into SSIs. These usually includes the masthead and footer, and main nav. It might also include a sidebar.
Then I turn what’s left into a DW template. Calls to the SSIs go in NON-EDITABLE areas (with the exception noted below).
So the template holds the calls to the SSIs, and sets out the structure — the stuff that NEVER CHANGES throughout the site (at least until the next revamp, when you scap all this stuff anyway).
The SSIs hold the content bits that are common throughout the site — or throughout a section. If I know, for example, that the site will have a secondary navigation for each subsection of the site, I put the call to that SSI into an EDITABLE area in the template — but the content for each secondary nav into an SSI so it’s maintained in one place.
The likelihood of having to change the template and upload every file becomes extremely small. But I can still take advantage of DW’s site management capabilities.
And, to be honest, every site I build that’s bigger than about 20 pages is going to be built on a content management system anyway.
When I work with simple HTML pages (not CMS) I like to put text file and manage it with java scripts.
If I need to corect something, I have one footer.txt file for the whole website and do corrections in whole website at once.
The same with navigation and even Header with images I can take into txt file
I use templates for a variety of reasons: they’re easy to use, they save time, and they help in brainstorming future designs.
A well-developed template, beit HTML, CSS, JavaScript, etc., is easy to use because all of the basic functions that many projects require are ready to use.
Being that these functions are ready to use, it saves time in development because you don’t have to reinvent the wheel. You can set everything up so all you have to add or change are the variables and parameters.
Templates are also good for brainstorming because one template might have a couple things that you need for a future project. Take bits and pieces from several templates and you have a brand new template, and the time you saved versus creating the whole project from scratch is huge.
So, you can see, templates have many excellent uses that will make your job easier.
I would like to KNOW HOW to use templates.
I do use two or three freeware WYSIWYG HTML editors that can employ templates; I think that -for light work- it could ea
I had an experience with DW Templates but I was the one taking over the site. Without research and the use of Notepad I could not change these regions. They were of course locked, so I had to copy the content to Notepad and take out the template coding. Soon after that, Jennifer answered a post and I found I could unlock it through DW. I don’t use them as I don’t want the next Web Designer to go through what I did. Before I did all the research I requested the owner to contact the previous Designer, he was so mad that someone else was taking over her site, he would not help. I guess if I really needed to use them, I would leave comments behind, breadcrumbs for the next Designer.
That’s my take.
Sandy K
I rarely use templates anymore. Once I have a few pages set out in the styles needed, such as the 3 column, 2 column and such (naming them base1, base2…) and then use the one needed for the page that is being worked on in the site. Remember to rename it to the page you are creating so the base file isn’t overwritten.
CSS is of tremendous value! The more I discover about CSS, the more I love it! From Borders to Navigation this tool does much more than people give it credit for.
I use SSI in SHTML and PHP for the repeating information that isn’t done in CSS.
I am currently working on multiple gaming sites for a client and the Find and Replace tool has been a valuable asset saving me many hours of searching and in doing so, saving the client money.
I use Dreamweaver templates all the time, and as Luis said, am the only one responsible for building sites.
Lou hit the nail on the head when he mentioned you could use sections of the template to build other unique layouts/sites.
I code in xhtml/css; use SSIs; js, and anything else that is appropriate for the occasion.
Inserting a js script in the footer automatically updates the copyright information, no need for SSIs.
If a website is built with a Dreamweaver template and the contract is a one time agreement, include the template and files on a disk for future use.
Re taking over another’s website and not getting any co-operation, well, you might ask if the former developer was notified and a release signed.) (Depending on what kind of arrangements were made initially, could this be a legal issue? I’m not sure. Contracts can be binding.)Whatever the situation, ask yourself “…how would I feel?”
My web site’s not that complicated. This means that, besides using CSS, I can use a few code snippets across the site for things like header/banner, copyright/footer info, even navigation. I’ve used Droopal and will again. It’s good for a site that’s meant to be a community. But, for my personal site I hand code with Cute HTML, using the modest quasi templates I’ve mentioned. Doing so allows me to keep the CSS and the (X)HTML clean and understandable (by me, anyway), as well as to validate all code relatively easily.
While my method might not be well suited to a complex site involving many developers and contributors, it works well for a personal site that strives to keep high tech gadgets to a minimum and that puts high value on valid code and maintaining at least double A accessibility standards. My experience with WYSIWYG editors is that they produce substandard code. One spends at least twice as much time combing through and repairing each page as hand coding it in the first place would have taken.
The upside of templates is that all your pages will look alike. The downside is all your pages will look alike.
SSI is an alternative, as is external JavaScript files. SSI includes another HTML file in your page (or txt or graphic) while JavaScript can be used to write code into your page to build text, include graphics, etc.
Where I work we share dreamweaver templates, libraries and site files with muliple people. We set up our “Remote Info” tab under Advanced Site Definition on shared network drive. Before you start work we “Synchronize” from the Site menu before you check out a file to work on. Granted Global changes require the entire site to be uploaded, however, using jar, tar or zip files and extracting the entire site works very nicely. Also, using SSI via apache can put your site somewhat at risk if not set up carefully. The network admin at my work will not allow us to use SSI.
jenny,
please i have been inlove with web designing but i have problem knowing how to develop any and i want to know if there is away that you can teach me so that ican be a good webmaster?i really need to find this opportunity