Viewing by month: February 2006

New Template Updating Feature in DW 8.01

With little fanfare (blow your trumpets please!) Macromedia Adobe introduced a new feature in the Dreamweaver 8 updater regarding template paths (see the full technote for more information).

What this means for us lowly developers, is that if we're using includes or folder specfic images and such inside Dreamweaver, we can have each file in a directory include another file inside the child page's directory... As I read that again it doesn't make a lick of sense, so here's an example:

Let's assume that every folder in your site relates to a specific section. And let's assume that you want to have a section image unique to each section. When you're looking at the rum section in the /rum folder, you want /rum/section.gif to display. When you're perusing the whiskey section at /whiskey/index.cfm, you want /whiskey/section.gif to display. A simple request right? Well it wasn't an easy task to accomplish before the latest updater.

Now, if you link to any file inside the Templates directory from a .dwt file, then when child pages are updated, any links to pages inside the Templates folder will not be rewritten. So let's assume the following directory structure:

wwwroot
|--Rum
|  |--index.cfm
|  |--section.gif
|--Templates
|  |--SiteLayout.dwt.cfm
|  |--section.gif
|--Whiskey
   |--index.cfm
   |--section.gif

Inside SiteLayout.dwt.cfm you have an <img> tag like so:

<img src="section.gif" />

Now, when you create a child page from the SiteLayout.dwt.cfm file, that image link won't be <img src="../Templates/section.gif"> as it would have been in Dreamweaver 8.0. Instead, it will be <img src="section.gif />, which means that each page based on the template will link to the section.gif file in its own folder.

Now that's just good stuff I tell you... If you don't like that feature however, you can turn it off by editing your Site Definition, clicking on the Templates category, and unchecking the "Don't rewrite document relative paths" checkbox. This will revert Dreamweaver 8.01 to Dreamweaver 8's default behavior.

Have fun!

4 comments | Posted by Daniel Short on Feb 12, 2006 at 12:00 AM | Categories: Dreamweaver - CSS - (X)HTML -