| Win Day 2005-07-25, 11:31 pm |
| OtherMDesigner wrote:
> Yeah, I was thinking include files would be the backup solution.
>
> However, I'm not quite sure how this would work..see, each department has its
> own left nav (HR, Finance, IT, etc). And each department will have several
> pages... so.. I'm not sure how the Server.Execute() would work exactly. Each
> page would have to have a way of knowing which department it belongs to.. PLUS,
> since the publishers are creating brand new pages, they don't have access to
> any ASP code. So I still think I'll have to have a template for each
> department. And each one will have a different #include file. (I'd rather use
> #include than Server.Execute, that way in Contrib, when they make a new page
> based off a template, they can SEE the left nav.. it's more WYSIWYG).
>
> Thanks for the input :)
>
Here's the thing: you cannot set which include file is brought in
programmatically. In other words, you can't specify which include file
need to be included by using a variable. You have to use
Server.Execute. It has to do with the order in which the code is read
and executed in a web page.
So:
Set a variable at the top of the page, like this:
<% whichLeftNav = "marketing.asp" %>
Then, where you want the include file brought in:
<% Server.Execute(whichLeftNav) %>
Where it gets complicated is how to set the value of whichLeftNav at the
top. Because I'm not using Contribute to do this, I just set the value
by using DW.
You might want to look into template conditional regions (I think
they're called) to bring in the correct include file. I highly
recommend this book, if you're going to start using templates in any
sort of advanced way:
"Dreamweaver MX Templates" by Brad Halstead and Murray R. Summers (New
Riders, 2003; ISBN 0-7357-1319-7)
Win
--
Win Day
Wild Rose Websites
"You dream it. We make it work."
-----------------------------------------------
Building affordable websites : http://www.wildrosewebsites.com
NEW! Website Design Kits : http://www.wildrosewebsites.com/services/kits.asp
-----------------------------------------------
|