Zeronese, Inc.
Home
Help & Support
Contact Us
   
Webmaster ResourcesArticle Details

Creating Dreamweaver Website Templates Starting From Photoshop

Date Added: May 12, 2009 08:34:01 PM
Author: Hassan Sayed
Category: Tips and Tutorials: Dreamweaver Tips and Tutorials

Introduction:
This tutorial is a good start for beginners who have a little or no knowledge in Photoshop and Dreamweaver, have a great imagination and would like to expand or start learning to design websites efficiently. It is written in a comprehensive step by step guide to make it easier for beginners to understand the process.



About The Tutorial



You will not realize how important it is to use templates to modify your web pages until you start doing so. When you have a website that consists of more than one page (almost all websites do), it becomes a pain to change a detail on every page when an update is required. Imagine having to change the year in your copyright notice on a website that has hundreds of pages and you have no system that controls it! If you are starting from a Photoshop design, or any other html file, this tutorial will help you create Dreamweaver templates to aid you in controlling updating your designs using Dreamweaver templates.



The Tutorial Step By Step:



1- Create Your Website Template: Start by creating your website layout in Photoshop. Design the layout in the way that you want your web pages to look like when it is ready.




 



CreateYourWebsiteTemplate



2- Slice your layout: The second step is to use the slice tool to cut your final Photoshop website template into pieces such as the header, columns, content areas and the footer.
The slice tool is the tool that looks like a mini knife in your tool bar.




Fig-2



PhtoshopSliceTool



You use the slice tool to draw a rectangle around each section that you want to separate from other sections in the layout of your website. In our case here we have the header, left column, content area and footer. Also, you need to slice each link you might have in your layout. You will end with something like this:




Fig-3



Sliceyourlayout



3- Enter Link Slices Data: While keeping the slice selected, you need now to put the urls into your links. You can put the links later when we get to Dreamweaver, but since we are here, why not learn how to do it.
Right click a slice that is a link slice and click slice properties:




Fig-4



EnterLinkSlicesData



A new window will open where you can enter the link properties, enter the appropriate values:




Fig-5



SliceToolData



Do the same thing for all your link slices.



4- Create HTML from your Photoshop website template: when all your slices are ready and you are happy with the template design, from the Photoshop menu bar, click on File, Save for Web & Devices and in the new window that shows, click the save button at the bottom.
The trick here is to make sure that the html and images is selected in the "Save as type" menu.



SaveasHTMLandImagesType
Fig-6



 



Tip: It is a good idea here to give your file name a name that relates to the content of your website. This will help a little for your search engine optimization because Photoshop will name the images using the name you enter here for file name.



If you browse to the directory where you placed your saved files, you should now find an html file and an images folder. This means you completed the Photoshop work. Close Photoshop and open Dreamweaver.



5- Open Template from Dreamweaver: Click File -> Open and browse to the html file that you saved in step 4.



6- If you did not input the links when you created your 'link' slices, now is a good time. Click on any link slice and point them to their respective links.



7- Template Regions: If you right click any image on your template file, you will see the "Template" menu. The template's sub-menu has various options for creating your template's regions. You will see that you can create (or edit): editable regions, optional regions or repeating regions. Each one has its own job in the template.



DreamweaverTemplateRegions
Fig-7



a- Editable Template Regions: those are probably the most important regions of your template. From their name, you can deduce that the editable regions of your templates are going to be the parts that are editable on your web page. They are usually the parts that differ from a page to page in your website.
Any region that is outside these regions cannot be edited when creating a web page using your template. Any part of your pages that you want to stay consistent across your website should be outside these editable regions.
In our Photoshop example, the most obvious editable region is the "content area". We want to have every page of our website to have its own content, so we make the "content area" an editable region.
Right click the "content area" (which was sliced in Photoshop), go to the "Template" menu and click on the "New Editable Region" submenu (see fig-8). Give it a name (ex: content_area).
You can now convert any slice that you think is should be editable on web pages. For our example, I will make the links in the left column both editable regions so I can change them on different pages.



b- Repeating Template Regions: Of course, those are the regions that are standard and consistent all over the website. A good example of these regions would be your header, footer and maybe your right or left columns. A good tip is to remember that you can include an editable region within a repeating region.
Again, go through each link, image or text that you want consistent on your website and make them "Repeating Regions". This should also include border images and the images that make the final website layout.
In our example, we have the header and footer images, links and border images that were created when we sliced our Photoshop design. Right click each and every one of them, go to the "Template" menu and click the "New Repeating Region" and give it a name.



c- Optional Regions: Optional regions define place holders on the template that you can decide to show or hide when using the template to make your web pages. In my example, I do not have any regions that I want to set as optional regions. This is your home work J have fun.



After you have created all the regions that you need, save the template and you should end with something like this:



Dreamweaver Template
Fig-8



8- Create the Dreamweaver Template: Very easy, having your html open in Dreamweaver, Click File -> Save as. When the 'Save As' window opens, make sure to choose 'Template Files (*.dwt)' for your 'Save as type'.



DreamweaverTemplateFileType
Fig-9



9- Using Your Dreamweaver Template: Click File -> New and choose "Page From Template". Select the template that you have created for your project and click create!
You will notice that you can only edit the regions that you made "editable regions". Create your first page by editing any editable region that you need for this page.
In this example I changed the main content area and put text instead. Save as html and preview... You got your first page.
Following the same procedure, do the same thing to create another page. I will create a second page. You can keep doing this for all the pages that you created links for when you sliced your design in Photoshop.



10- Editing Your Dreamweaver Template: This is the fun part and the most important reason behind having a website template in the first place. Make a change in one place and the changes appear on all pages at once.



Open your template file. Make any changes you want, such as making an image or changing the copyright notice to the current year.
From the "Modify" menu, choose "Template" and then "Apply Template to Page". Select the pages that you want the modifications to take effect on, click the update button and check your web pages in your browser.



I hope this tutorial helps you get the idea of creating templates using Dreamweaver. If you have any questions or comments, feel free to submit them below and I will respond to them as soon as I can.



Good luck with your website designs.



Feel free to use the information included in this tutorial for both personal and commercial website designs. However the tutorial itself is a copyright of zeronese.net and it is illegal to copy and/or redistribute it in whole or in part without a written notice from zeronese.net.


 
RELATED ARTICLES & TUTORIALS
Powerhouse Tips from Dreamweaver Training

If you've been using Dreamweaver for a long time, you may think you know it all. Odds are however, that you could still benefit from learning a few tips and tricks to make Dreamweaver more powerful and versatile. Even experts can benefit from Dreamweaver


Intro To The New Dreamweaver 8

On August 8 2005, Macromedia announced it's release of Macromedia Studio 8. This was an improvement of it's already popular MX2004 Version.


Creating Your Own Dreamweaver Template File

If you have built websites, you understand how frustrating it can be to have to update the look and feel of a lot of webpages.


Cool Rollover Buttons & Pop-Up Menus In Dreamweaver

Adding a rollover button to a webpage with Dreamweaver is a really simple task...if you have the button images ready to go.


Macromedia Dreamweaver MX Snippet: Create It and Use It!

The Macromedia Dreamweaver MX have these powerful new addition to its toolset – introducing, Snippets! Do you often use blocks of code? Well, snippets make it easy to save it or put it over the same conversion on a block already written on your page. It a


 
Ratings Average rating: 10 (5 votes)
Comments
Guest: 2009-07-04 13:06:55
my images dont show up when i preview the html...
Guest: 2009-07-04 13:56:51
at which stage? after saving from photoshop or from Dreamweaver???
Guest: 2009-08-15 19:14:57
Great Great Great Tutorial I ever seen. Simple yet approchable. It could be more attractive and understable if you put along with working example for download.
Thanks

Leave your comment:
Name or Website:
Email:
Comment
Visual Confirmation Security Code

*Enter the code shown:  


The views and opinions of authors expressed on Zeronese Webmaster Article Directory web sites do not necessarily state or reflect those of the Zeronese.net .