Advertisement:

Author Topic: Select which main menu items to show via the theme  (Read 698 times)

Offline mabley

  • Jr. Member
  • **
  • Posts: 123
Select which main menu items to show via the theme
« 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.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,083
Re: Select which main menu items to show via the theme
« Reply #1 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.

Offline BryanD

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,129
  • Gender: Male
Re: Select which main menu items to show via the theme
« Reply #2 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
Former Project Manager and Customizer of SMF
Former Marketing and Vice-President of Simple Machines

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,589
    • StoryBB/StoryBB on GitHub
Re: Select which main menu items to show via the theme
« Reply #3 on: July 14, 2017, 05:17:01 AM »
Just because that routine is run, doesn't mean you have to actually use its data...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline mabley

  • Jr. Member
  • **
  • Posts: 123
Re: Select which main menu items to show via the theme
« Reply #4 on: February 28, 2018, 06:19:25 PM »
Thanks so much! This is helpful info.