Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: mabley on July 13, 2017, 10:43:19 PM

Title: Select which main menu items to show via the theme
Post by: mabley on July 13, 2017, 10:43:19 PM
I am doing some theme experimentation.

I'd like to be able to pick and choose what main menu items show up, so that I can have some main menu items in one place, and other main menu items in another. (Weird, I know. I'm playing.)

Example:
Show Home, Help, Search, Admin and Moderate in the main menu above the forum index.
Show Profiles, Messages, Login/Logout, Register in a sort of profile sidebar thingy.

Any clues? Is there something I can do with the function template_menu() in my index.template.php?

I know you can fiddle with the menu in Subs, but I want to be able to do it in the theme.
Title: Re: Select which main menu items to show via the theme
Post by: Illori on July 14, 2017, 05:06:57 AM
we have moved the menu out of the theme as it was harder to manage. i am not really sure what you want to do can be done any longer.
Title: Re: Select which main menu items to show via the theme
Post by: Deaks on July 14, 2017, 05:15:11 AM
you could look at how it was done in 1.x and copy that as it put it ib your themes index.template or copy the the section from subs and rename it to something different and  all that new function in the theme not the default.  What you want to do is easy to do just need to experiment.  Just need to create a new call reallty and not use the default
Title: Re: Select which main menu items to show via the theme
Post by: Arantor on July 14, 2017, 05:17:01 AM
Just because that routine is run, doesn't mean you have to actually use its data...
Title: Re: Select which main menu items to show via the theme
Post by: mabley on February 28, 2018, 06:19:25 PM
Thanks so much! This is helpful info.