<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Josh Stauffer<title>&#187; Adobe Dreamweaver</title>
</title>
	<atom:link href="http://www.joshstauffer.com/tag/adobe-dreamweaver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joshstauffer.com</link>
	<description>Tips and Tricks from an Internet Entrepreneur &#38; Enthusiast</description>
	<lastBuildDate>Tue, 31 Aug 2010 03:13:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Dynamic Menus in a Dreamweaver Template</title>
		<link>http://www.joshstauffer.com/dynamic-menus-in-a-dreamweaver-template/</link>
		<comments>http://www.joshstauffer.com/dynamic-menus-in-a-dreamweaver-template/#comments</comments>
		<pubDate>Wed, 09 May 2007 02:24:25 +0000</pubDate>
		<dc:creator>Josh Stauffer</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Adobe Dreamweaver]]></category>

		<guid isPermaLink="false">http://www.joshstauffer.com/2007/05/08/dynamic-menus-in-a-dreamweaver-template/</guid>
		<description><![CDATA[Web templates, whether they are made in Dreamweaver or Expression, have always been a tremendous time saver when it comes to updating your website site wide. Until today, I always thought that the only drawback to using a template is it made it very difficult, if not impossible, to have dynamic menus. If you are [...]


Related posts:<ol><li><a href='http://www.joshstauffer.com/display-the-latest-posts-with-wordpress/' rel='bookmark' title='Permanent Link: Display the Latest Posts with WordPress'>Display the Latest Posts with WordPress</a></li>
<li><a href='http://www.joshstauffer.com/neat-pop-up-windows-for-images/' rel='bookmark' title='Permanent Link: Neat Pop-up Windows for Images'>Neat Pop-up Windows for Images</a></li>
<li><a href='http://www.joshstauffer.com/website-value-calculator/' rel='bookmark' title='Permanent Link: Website Value Calculator'>Website Value Calculator</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.joshstauffer.com%2Fdynamic-menus-in-a-dreamweaver-template%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.joshstauffer.com%2Fdynamic-menus-in-a-dreamweaver-template%2F&amp;source=joshstauffer&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Web templates, whether they are made in <a href="http://www.adobe.com/products/dreamweaver/" title="Adobe Dreamweaver" target="_blank">Dreamweaver</a> or <a href="http://www.microsoft.com/expression/" title="Microsoft Expression" target="_blank">Expression</a>, have always been a tremendous time saver when it comes to updating your website site wide. Until today, I always thought that the only drawback to using a template is it made it very difficult, if not impossible, to have dynamic menus. If you are wondering what I mean when I say dynamic menu let me explain. Simply put, dynamic menus are menus that highlight the link depending on which page your website visitor is on.</p>
<p>Well&#8230; today the light bulb came on and I want to share my solution with you.</p>
<p>I made a template in Dreamweaver then created four pages based on this template.  The source code for the navigation menu in my template looks like this:</p>
<pre style="border: 1px dotted #8080ff; padding: 2px; background: #ccccff none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
&lt;div class="navigation"&gt;
&lt;a href="../index.html" id="link1"&gt;Home&lt;/a&gt;
&lt;a href="../demographics.html" id="link2"&gt;Demographics&lt;/a&gt;
&lt;a href="../family-friendly.html" id="link3"&gt;Family Friendly&lt;/a&gt;
&lt;a href="../entertainment.html" id="link4"&gt;Entertainment&lt;/a&gt;
&lt;/div&gt;</pre>
<p>Attached to my template is an external CSS file in which I have created these styles:</p>
<pre style="border: 1px dotted #8080ff; padding: 2px; background: #ccccff none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
.navigation a {
	display:block;
	padding:10px;
	width:100px;
	background:#666666;
	text-decoration:none;
	color:#FFCC66;
}
.navigation a:hover {
	background:#999999;
	text-decoration:underline;
}</pre>
<p>Now all the links will look the same in the navigation menu across the entire site but we are not finished yet. That id=&#8221;link#&#8221; is what is going to make this menu dynamic. All you have to do is place these style declarations in the appropriate pages. Dreamweaver automatically creates an editable region in the head section of the HTML document. This is where we will insert some CSS.</p>
<p>In the page index.html, this code is in the head section&#8217;s editable region:</p>
<pre style="border: 1px dotted #8080ff; padding: 2px; background: #ccccff none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
#link1 { background:#111111; color:#99CC66; text-align:right; }</pre>
<p>In the page demographics.html, this code is in the head section&#8217;s editable region:</p>
<pre style="border: 1px dotted #8080ff; padding: 2px; background: #ccccff none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
#link2 { background:#111111; color:#CC6666; text-align:right; }</pre>
<p>In the page family-friendly.html, this code is in the head section&#8217;s editable region:</p>
<pre style="border: 1px dotted #8080ff; padding: 2px; background: #ccccff none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
#link3 { background:#111111; color:#9999FF; text-align:right; }</pre>
<p>In the page entertainment.html, this code is in the head section&#8217;s editable region:</p>
<pre style="border: 1px dotted #8080ff; padding: 2px; background: #ccccff none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
#link4 { background:#111111; color:#FF66FF; text-align:right; }</pre>
<p>And that&#8217;s it. I&#8217;ve created a standard look for the menu links in an external CSS file. I have created a different look for each link which was then placed in the page associated with that link.</p>
<p>For an example, <a href="http://www.joshstauffer.com/examples/dwtempmenu/" title="Dynamic Menus in a Dreamweaver Template Example" target="_blank">click here</a>.</p>


<p>Related posts:<ol><li><a href='http://www.joshstauffer.com/display-the-latest-posts-with-wordpress/' rel='bookmark' title='Permanent Link: Display the Latest Posts with WordPress'>Display the Latest Posts with WordPress</a></li>
<li><a href='http://www.joshstauffer.com/neat-pop-up-windows-for-images/' rel='bookmark' title='Permanent Link: Neat Pop-up Windows for Images'>Neat Pop-up Windows for Images</a></li>
<li><a href='http://www.joshstauffer.com/website-value-calculator/' rel='bookmark' title='Permanent Link: Website Value Calculator'>Website Value Calculator</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.joshstauffer.com/dynamic-menus-in-a-dreamweaver-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
