A better way to do this is to set a variable in your page before you call
the include.  That way you can have several pages affect the navigation  so

<cfset primary = "about">
<cfset secondary = "contactus">
<cfinclude template="/includes/nav.cfm">

Then have cfswitch/cfcase statements in your include that tweaks the nav
dependent on the primary and secondary vars.



-----Original Message-----
From: Scott Williams [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 04, 2007 9:46 PM
To: CF-Newbie
Subject: Re: Returning the running template name within a CFIF statement

Doh! Never mind. I did a search for CGI variables on
the internet and found my answer. It's SCRIPT_NAME.

Thanks anyway,

Scott

--- Scott Williams <[EMAIL PROTECTED]> wrote:

> Hi all --
> 
> It's my first time posting to this list. Howdy!
> 
> I hope you can help me out.
> 
> It's been years since I've done this, and I can't
> remember how to get the file name of the template
> that's currently processing.
> 
> Plain as mud, right?
> 
> Here's what I'm trying to do.
> 
> I've got a header I want to use for all the pages in
> my website. I'm using a cfinclude to accomplish
> this,
> which works fine.
> 
> However, the header needs to act a bit differently
> depending on the name of the template being
> processed.
> 
> I'm using CFIF like this:
> 
> <cfif "thisPageName" is "blah.cfm">
>      do this
> <cfelse>
>      do that
> </cfif>
> 
> So what I'm looking for is the code that will tell
> me
> thisPageName.
> 
> Thanks in advance for any help you can provide.
> 
> Scott
> 
> 
>  
>
____________________________________________________________________________
________
> Expecting? Get great news right away with email
> Auto-Check. 
> Try the Yahoo! Mail Beta.
>
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> 
> 
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2683
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to