View Full Version : Templates in Dreamweaver

06-10-2008, 05:08 PM
Hi, Ive asked corrosive (who is being very helpfull:)), when using a template to save time making a website. For example I have an index page, I save this page as a template with its css file. I can use css to make any changes in the rest of the pages that I apply the template to but do you have to use the Edit regions? Or can u simply use css to make the changes┐?
My tests lead me to believe that if you use templates you MUST make editable regions....is that right?

PS: I can see that I can attach a new css style sheet and make changes, but there is no way of changing the div tag, I suppose this means that I must make editable regions to change things around if I wanted to (this is more curiosity than anything else, Im just testing things....)
PS: Imagine My page remains more or less the same structurally wise. But on one page Id like to add a small submenu on the left...normally Ied add another divtag div#leftmenu....but using the templates is this possible as I cant see any way of adding divs....Hope my question is clear..

06-10-2008, 05:40 PM
Yes, you're talking about 2 different things:

1. You probably don't need more than 1 style sheet for the whole website to start with, until you get more advanced. This will take care of the design/style of your website.
2. Editable Regions is there to add different content on your pages. All your files will use the same master file (template), and then you can add custom content to each page in the editable regions.

For navigation you might want to use something else. Library items? Anyone?

06-10-2008, 05:51 PM
ok, but what if for example, I have a div tag in my main page which has some text but in another page of the site I dont want that div tag to be there. can I delete it using the template method?

06-11-2008, 01:11 AM
Yes, it should be in the editable region then. Don't even put it in the template.

06-12-2008, 11:42 AM
Quick question. Once I have my index page and save as template, I can then apply to all the rest fo the pages of my website. When I open a new page, apply the template....this new page I save as....a template (again) or just a normal page┐??

I have my index page which is a .dwt ---- the rest of the pages must also be template or not?
EDIT: When i create a template from my index page it saves a dwt file, its separate to my original index.htm file............is this correct?? DO I have to link the two somehow??

06-12-2008, 01:06 PM
You got this all mixed up :)

1. Start with making a template, it will be saved as .dwt
2. Then start making the pages for your site from this template. I think it's 'New From Template' in the file menu. Your index file should be named index.html or similar.

I think you just have to open the help files for the template system, I think you might have skipped them somehow ;)

06-12-2008, 01:13 PM
Hi...Yeah I figuered it out. My links werent updating properly...but I found this from a tutorial on the net and its working now...I just hope the info I followed is correct!:roll:

At present, your home page, the index.html, is not regarded by Dreamweaver as being based on the template you created. Since we want Dreamweaver to handle all the mundane and tedious job of updating all our pages every time we change the design of our site, we need to associate the page with the template.
The least troublesome way to do this is to overwrite your old index.html file with a new file created based on the template. You can do this with no loss of data since your template was created from the index.html file with no changes other than to define editable regions and the like.

Close all open files. To do this, click "File | Close All".
Click "File | New". A dialog box appears. You saw this dialog box in chapter 1. This time, look at the left column and click "Page from Template". The middle columns will show information about the template you created earlier, and the rightmost column will show a thumbnail picture of your template. Make sure that the checkbox for "Update page when template changes" is checked. Click "Create".
Click "File | Save As". A dialog box opens allowing you to specify the filename. Enter "index.html" (without the quotes) or just select the "index.html" file that appears in the window. Click "Save". A message box appears asking if you want to overwrite the existing file. Click "Yes".
That's it. You have replaced your old index.html with an identical copy, except that this time, Dreamweaver has recorded the index.html as being dependant on the template, so that the next time you modify the design of your template, this page will be automatically updated.

06-12-2008, 07:58 PM
Looks like part of your post was a quote, use the quote buttons when writing a post, that makes it alot easier :) I added them to your post, I think I got it right.

The text above applies for using the template system on an existing website. If you do not have an existing website online, then don't follow these instructions and refer to the manual instead.