Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF/THEN for Navigation Options Available.

Status
Not open for further replies.

ITGL72

MIS
Jul 2, 2001
105
0
0
US
I am working on a navigation menu in which I only want certain links shown depending on the page you are on. I assume at the top of the page I would have some type of CF code like a SET PAGE = "pageb" and down by the navigation if it said IF PAGE = "pageb" --show it, otherwise do not show it.

Can someone display for me the correct syntax of CF code to make this work?
 
top of the page:
Code:
<cfset pname=listlast(cgi.script_name,"/")>

The IFs
Code:
<cfif pname is not "index.cfm"><A href="index.cfm">Home</A></cfif>

or

Code:
<cfif pname is "index.cfm">Home<cfelse><A href="index.cfm">Home</A></cfif>

etc.. assuming index.cfm is the page that Home would link to

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top