PDA

View Full Version : IF clauses and adv_index


nymyth
08-10-2007, 10:47 AM
I run a sports forum and have a tabbed menu system at the top.

The tab is highlighted when you are on a specific script.

So if you are on the home page I have this
<if condition="THIS_SCRIPT == 'adv_index'"><a href="http://www.nysports365.com" class="tab2">Home</a><else /><a href="http://www.nysports365.com" class="tab" id="active">Home</a></if>

HOWEVER, I have just created another page using vbadvanced for standings but when you click on standings it only highlights the Home button, because I am using adv_index script.

My question is, is there someway where my if clause can change so when you click on the standings tab, the standings tab is highlighted not the home tab.

I hope this is clear....u see it live at www.nysports365.com

THANKS.

Brian
08-10-2007, 06:12 PM
You should be able to use this <if condition> to determine which CMPS page you are on.
<if condition="$pages['name'] == 'page_identifier_here'">

And assuming your homepage is the only one that the 'Home' tab should be highlighted on, then you should be able to change your current <if condition> for that tab to this:
<if condition="$pages['name'] == 'home'">

Our Sponsors
 

nymyth
08-10-2007, 08:38 PM
wow..u thought of everything...lol....

The home one works great..however the second one isnt working at all. I changed the identifier to 'standings' but nothing.....

Brian
08-11-2007, 09:58 AM
Can you post the exact code you're using?

Our Sponsors
 

nymyth
08-11-2007, 02:48 PM
sorry Brian, it was my mistake....i didnt put in the right tab class......thanks for this....vbadvanced keeps surprising me time and time again...it truly is one hell of a product

Brian
08-12-2007, 11:09 AM
:cool: