Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 08:54 pm EST

Geeklog Forums

Automatic Menu Block ?


jvelcro

Anonymous
I am starting to understand the menu_elements and plg_menu_elements and how to use them in a skin. My question is has anyone looked into making these into a block, which then the menu could be on the left (or wherever)? In addition, maybe some way to pick and choose which items show up? Maybe i'm leading myself into building my first block Wink Thanks in advance for any help, input, suggestions.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The menu_elements and plg_menu_elements variables are really only defined for use in the header.thtml file, i.e. you can not simply use them somewhere else. You could, however, look up how they work in function COM_siteHeader() in lib-common.php and make a PHP block with the same (or similar) functionality. bye, Dirk
 Quote

Anonymous

Anonymous
How do I change, remove or add new menu items?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Plugins can add new menu items. For example, the static pages plugin has an option for every page to add it to the menu. Other than that, there's not much you could do. The variable (menu_elements) represents the "normal" menu and the contents of that menu is hard coded in Geeklog. You could however, remove the variable and put only the menu items you want directly into your header.thtml. Have a look at how the different themes do it, it should give you some ideas. bye, Dirk
 Quote

All times are EST. The time is now 08:54 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content