You could do that with a very simple flag.

<cfset ImThisSection="About">
<cfinclude template="navigation.cfm">

Then in the navigtion, you would do something based on the value of
ImThisSection.  And if you put a <cfparam> into the navigation file, you
could have a default behavior of not other value is passed in.  This of
course could also be handled with <cfelse> or <cfdefalutcase> depending on
how you want to code it, but I think that gives you the idea.

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-----Original Message-----
From: Jeff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:30 AM
To: CF-Talk
Subject: Re: Context Sensitive, dynamic navigation include? How to
accomplish?


on 6/3/03 11:20 AM, Howard Fore at [EMAIL PROTECTED] wrote:

> On Tuesday, Jun 3, 2003, at 10:31 US/Eastern, Jeff wrote:
> 
>> Any ideas?
> 
> In the past I've done this with a single page with all the navigation.
> It cfswitches to display the appropriate parts based on a variable set
> in the page that included it.
> 
> As for the application.cfm execution, I think it will only execute once
> per "request" not per include. For instance, if you had a page that
> ended in a cflocation to another page, the application.cfm would
> execute twice. However a page that includes another will only execute
> application.cfm once. I think cfmodule would fall in the same category
> as cfinclude.

Hmmmm...application.cfm running only once *might* provide a workable
solution to this.

Is it possible to determine the calling page for an include somehow? In
other words, if the page that was calling the navigation include were in a
particular directory, or even began with a particular string
(about_history.cfm, about_index.cfm, contact_info.cfm, contact_form.cfm)
then I *might* envision some way to determine that and use it to my
advantage...

But like I said, I'm in the early stages of just figuring out if I can even
DO it, and it's mainly for an estimate for time. I figure with the amount of
pages this site will contain, if I could do a dynamic navigation, that would
shave hours as compared to creating several "versions" of the navigation,
which just talking about gives me the willies, not to mention just *sounds*
wrong. Lol.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to