General Community > Scripting Help
Why don't my menu button highlight like the other buttons?
(1/1)
ApplianceJunk:
In the list of menu buttons on my site I have one I created called "Fault Codes" and it links to a forum topic.
Here is the code for it.
--- Code: ---// [Fault Codes] button
'menu_fault_3' => array(
'title' => 'Fault Codes',
'href' => 'http://appliancejunk.com/forums/index.php?topic=8959.0',
'show' => true,
'sub_buttons' => array(
'sub_fault_action' => array(
'title' => 'Fault Code Index',
'href' => 'http://appliancejunk.com/forums/index.php?topic=8959.0',
'show' => true,
'is_last'=> true,
),
),
),
--- End code ---
The button seems to work fine for linking to the forum topic, but I just noticed today that it does not highlight like the other buttons after you click on it. It highlights when you hover over it just before you click on it, but it's not highlighted after you click on it.
Not sure if 'highlight' is the correct word or not so I have attached some images to show what I'm trying to explain.
Thanks,
Kays:
Hi, that menu buttons are automatically highlighted if the page is accessed via $_GET['action']. But since that's not the case for your page. Something to try (not tested).
In Subs.php look for:
--- Code: --- $context['in_maintenance'] = !empty($maintenance);
$context['current_time'] = timeformat(time(), false);
$context['current_action'] = isset($_GET['action']) ? $_GET['action'] : '';
--- End code ---
and add before that:
--- Code: --- If (isset($_GET['topic']) && $_GET['topic'] == 8959)
$_GET['action'] = 'menu_fault_3';
--- End code ---
Navigation
[0] Message Index
Go to full version