Advertisement:

Author Topic: Select which main menu items to show via the theme  (Read 663 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 Master
  • *
  • Posts: 49,239
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,090
  • 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: 68,382
    • Arantor 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...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

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.