Matthieu:
What I do is either CFMODULE a header file in, so it looks something like
this:
<cfmodule template="header.cfm" PAGE="home">
or I include it like this:
<cfset page="attributes.home">
<cfinclude template="header.cfm">
And then the header.cfm file looks like this.
<cfif LCase(attribtues.page) EQ "home">
<b>HOME</b>
<cfelse>
HOME
</cfif>
Something like that works great. Also, to resolve the urls I set a request
variable named request.urlprefix in my application.cfm or app_server.cfm
(<--fusebox peeps) and affix that to every link. Like this:
<cfset request.urlprefix = "http://www.yourdomain.com">
<a href="#request.urlprefix#/home.cfm">HOME</a> or <a
href="#request.urlprefix/category/index.cfm">HOME</a>
--=@ greg @=--
----- Original Message -----
From: "Cornillon, Matthieu" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, January 11, 2001 1:11 PM
Subject: site navigation templates
> Hi. On the site that I maintain, each page has a series of links along
the
> side and bottom of the page. I want to set up header (side links) and
> footer (bottom links) documents that I can CFINCLUDE from all over the
site.
> Links on the bottom are constant across the site. Easy. But links on the
> side change depending on your current page, in two different ways:
>
> 1) The link for the current page is highlighted in yellow, as opposed to
the
> normal white.
> 2) The links, which appear in a sort of tree, are collapsed for all
> categories other than that of the current page.
>
> I know I will have to address issues of relative links and stuff. I feel
> like I can handle those. What I'm really concerned with is telling the
side
> bar what links to show. I considered having a database that held each
> page's navbar structure (yuk!), or trying to set up some conditional
> processing to allow the CFINCLUDEd navbar page to determine itself based
on
> the page in which it is included. Both of these seem really messy. This
> seems like a common need for sites. Is there an easy way that I am
missing?
>
> Thanks in advance,
> Matthieu
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists