Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Template problem - Can't adjust file path in conditional comments

Status
Not open for further replies.

NIA2

Technical User
Aug 30, 2006
137
AU
Hi everyone,

I've used the template feature in dreamweaver to create a site. The site contains conditional comments to feed a separate stylesheet to internet explorer browsers. The css files are stored in a css directory that sits in the main site directory. Some of the web pages are located in the main site folder and others are nested within subdirectories. Since all pages in the site need to reference the css file located in the css directory, the file path in the conditional comments within the template will have to be different depending on where the subpages exist. I tried putting the conditional comments within an editable region in the template so I could change the file path as needed in the pages themselves but because dreamweaver adds template comments like this:

<!-- InstanceBeginEditable name="head" -->
<!--[if lt IE 7]>
<link href="../css/win_ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!-- InstanceEndEditable -->

...the browser isn't rendering the code.

Can someone tell me how I can get around this problem?

Appreciate any help.
 
How many css files and subfolders are we talking?
it may be easier to just make 2-3 templates for each subsection with their own links/paths to css...since conditions work only on IE.

Other option, (read better), is to use server side language (asp,php,jsp...)to 'write out' paths to these css. Dynamic languages have better hooks to do so and are browser independent. This of course, turns into hand coding and loosing some of the DW GUI.

Perhaps of some use:
All the best!

:--------------------------------------:
Do the DW »|MostarNetworks|
 
Thanks for the ideas and the link - very helpful.
 
Great, take your time now to layout it out and it will be easeir down the line.
All the best!

:--------------------------------------:
Do the DW »|MostarNetworks|
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top