Aaron310012
01-30-2012, 03:48 AM
Hello,
I have created several new Navbar tabs linking to different CMS sections using the solution found here:
https://vborg.vbsupport.ru/showthread.php?t=226914
The tabs work great, but do not highlight when selected. Instead, "Home" remains highlighted.
I've been working with this for a while without any luck. I understand that I must define a condition for the highlighting to work but since these are all CMS section pages THIS_SCRIPT always = 'vbcms' for all of the section pages, so this is not a unique condition. I have also tried to define the URL several different ways using both standard URLs and Friendly URLs without success.
Here is an example of the plugin code I'm trying to use for a "Contact" tab:
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'Contact')
{
$vbulletin->options['selectednavtab']='Contact';
$tabselected = ' class="content"';
}
$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab"
href="content.php/102-Contact">Contact</a>'.$tablinks.'</li>' ;
I have also tried to define "THIS_SCRIPT ==" as all variants of the actual URL as well as R= etc.
Does anyone happen to have any advice regarding the proper way to define a unique variable for the section pages of the CMS? Thanks in advance for any input!
I have created several new Navbar tabs linking to different CMS sections using the solution found here:
https://vborg.vbsupport.ru/showthread.php?t=226914
The tabs work great, but do not highlight when selected. Instead, "Home" remains highlighted.
I've been working with this for a while without any luck. I understand that I must define a condition for the highlighting to work but since these are all CMS section pages THIS_SCRIPT always = 'vbcms' for all of the section pages, so this is not a unique condition. I have also tried to define the URL several different ways using both standard URLs and Friendly URLs without success.
Here is an example of the plugin code I'm trying to use for a "Contact" tab:
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'Contact')
{
$vbulletin->options['selectednavtab']='Contact';
$tabselected = ' class="content"';
}
$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab"
href="content.php/102-Contact">Contact</a>'.$tablinks.'</li>' ;
I have also tried to define "THIS_SCRIPT ==" as all variants of the actual URL as well as R= etc.
Does anyone happen to have any advice regarding the proper way to define a unique variable for the section pages of the CMS? Thanks in advance for any input!