Dreamweaver Fails Conditional Comments

If you create Dreamweaver templates for yourself or clients and have pages in multiple subdirectories, you’ll notice Dreamweaver fails to update the relative path to the IE stylesheets if you use conditional comments for them. Because they’re comments, Dreamweaver ignores them. Luckily, Dreamweaver has a plethora of parameters to get around almost any problem, so here’s how we fix this one:

<!– TemplateParam name=”ie6″ type=”URL” value=”../stylesheets/ie6.css” –>
<!– TemplateParam name=”ie7″ type=”URL” value=”../stylesheets/ie7.css” –>
<!–[if IE 6]><link rel=”stylesheet” href=”@@(ie6)@@” type=”text/css”
charset=”utf-8″ /><![endif]–>
<!–[if IE 7]><link rel=”stylesheet” href=”@@(ie7)@@” type=”text/css”
charset=”utf-8″ /><![endif]–>

Put that into your master template and you should be good to go!

I searched all over Google for a fix to this problem and none was to be found, so I hope people are able to find this one.

One Comment

  1. Kevin Cupp
    Posted December 16, 2008 at 8:58 pm | Permalink

    Lee: The code probably isn’t working because WordPress took some of it out so it would show up correctly. Just make sure all the comments are formatted like as opposed to one dashes above. What exactly do you need clarifying?

2 Trackbacks

  1. By LinkExchangeDepot.com Link Exchange on October 29, 2008 at 8:39 am

    LinkExchangeDepot.com Link Exchange…

    The best part of our service is that we take care of all the work for you, allowing you to focus on running your business or organization. That means no more searching for websites to exchange links with, no more sending out unsolicited email link exch…

  2. By retytwlc on November 19, 2008 at 5:39 am

    retytwlc…

    retytwlc…

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
vpn service