Page 1 of 1

ACTIVE TAB HELP

Posted: Sat Mar 12, 2011 5:16 am
by wads24
So, I just installed a rules mod that works off the FAQ page. I need help with the menu. When I click on the Rules TAB, I want that TAB to become active. Right now though it is active on the FAQ TAB. Below is the line I need help with.

Code: Select all

 <!-- IF S_HIDE_RULESMOD --><li<!-- IF $_SERVER['SCRIPT_NAME'] == 'faq.php?mode=rules' --> class="activetab"<!-- ENDIF -->><a href="{U_RULES}" title="{L_RULES_PAGE}"><span><img src="styles/prosilver/theme/images/icon_rules.gif" />&nbsp;{L_RULES}</span></a></li><!-- ENDIF -->
This is the FAQ TAB, and it works fine.

Code: Select all

<li<!-- IF $_SERVER['SCRIPT_NAME'] == '/faq.php' --> class="activetab"<!-- ENDIF -->><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}"><span><img src="styles/prosilver/theme/images/icon_faq.gif" />&nbsp;{L_FAQ}</span></a></li>

Re: ACTIVE TAB HELP

Posted: Sun Mar 13, 2011 1:26 am
by Josh
$_SERVER['SCRIPT_NAME']will not work because it only returns the name and not the parameters.

another way to do this, is define your own template variables.
can you please provide a link to your board?

Re: ACTIVE TAB HELP

Posted: Sun Mar 13, 2011 7:20 am
by wads24
PM sent... Thanks for your help.