HighDots Forums  

Problem using Template Parameter

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Problem using Template Parameter in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ronsf
 
Posts: n/a

Default Problem using Template Parameter - 08-01-2004 , 12:46 PM






I'm trying to use a template parameter to control page layout. I have one css
sheet for a 2-col layout and another for a 3-col layout. My template has the
following code:

<head>
<link rel="stylesheet" href="../css/v4.css" type="text/css" media="screen" />
<link rel="stylesheet" href="@@(screen_css)@@" type="text/css" media="screen"
/>
<!-- TemplateParam name="screen_css" type="text"
value="../css/screen_3col.css" -->
</head>

and a page based on my template has this code:

<head>
<link rel="stylesheet" href="css/v4.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/screen_3col.css" type="text/css"
media="screen" />
<!-- InstanceParam name="screen_css" type="text"
value="../css/screen_3col.css" -->
</head>

Notice that the first href has resolved correctly, (i.e. "../css/v4.css" is
replaced by "css/v4.css" since the page is located on level above the template
directory), but the second href does not get resolved, so the desired layout
does not get applied.

Strangely, if I create a nested template off of the base template, this
process seems to work correctly.

Can anyone provide insight on this?

Thanks,
Ron






Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Problem using Template Parameter - 08-01-2004 , 01:05 PM






Yes. Make the reference to the screenstylesheet into a root relative one.
Instead of this -

value="../css/screen_3col.css" -->

have this -

value="/css/screen_3col.css" -->

and see what happens.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"ronsf" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I'm trying to use a template parameter to control page layout. I have
one css
sheet for a 2-col layout and another for a 3-col layout. My template has
the
following code:

head
link rel="stylesheet" href="../css/v4.css" type="text/css"
media="screen" /
link rel="stylesheet" href="@@(screen_css)@@" type="text/css"
media="screen"
/
!-- TemplateParam name="screen_css" type="text"
value="../css/screen_3col.css" --
/head

and a page based on my template has this code:

head
link rel="stylesheet" href="css/v4.css" type="text/css" media="screen"
/
link rel="stylesheet" href="../css/screen_3col.css" type="text/css"
media="screen" /
!-- InstanceParam name="screen_css" type="text"
value="../css/screen_3col.css" --
/head

Notice that the first href has resolved correctly, (i.e. "../css/v4.css"
is
replaced by "css/v4.css" since the page is located on level above the
template
directory), but the second href does not get resolved, so the desired
layout
does not get applied.

Strangely, if I create a nested template off of the base template, this
process seems to work correctly.

Can anyone provide insight on this?

Thanks,
Ron








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.