News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Active menu tab

Started by [chrisB], March 17, 2025, 10:34:53 AM

Previous topic - Next topic

[chrisB]

I do use SMFPacks Menu Editor Pro mod, but I believe the principle is the same.

I am trying to understand why certain pages created using TinyPortal decide to show in the 'home' tab of my site. There are pages which I have made that highlight on the right tab, but many do not. I would like to try to fix this, but I would need someone more knowledgeable to kindly explain the process.

URL: https://poetryartonline.com/about/

Here's an example


What I need to understand is what file is responsible for this.

What part of the code makes the tab active and how to change it, so I can make the correct tab display.

Could anyone help me?

Many thanks, in advance.
I'm stuck in a time warp from the early 00's.

Kindred

If they are not defined in the active tab list in Subs.php and the name does not EXACTLY  match the action variable,  then it will show the active tab as home.

Also, all SUB menu items will default to home
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

[chrisB]

I can add them to the subs.php right?

'about' => array(
    'title' => 'About',
    'href' => $scripturl . '/about/',
    'show' => true,
    'active_button' => $context['current_action'] == 'about',
    'sub_buttons' => array(),
),

It sounds simple enough, but I can't get the page to be active.

I've tried with the URL hardcoded, the category URL etc.

Any advice would be appreciated as always, thanks again.
I'm stuck in a time warp from the early 00's.

Kindred

The active tab system is the function AFTER  that...it's not quite as straightforward as the buttons
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: