Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 07:16 pm EDT

Geeklog Forums

How to change the order of the menu items


djbrakez

Anonymous
confused
I created a few static pages and choose to display them on the navigational menu at the top of the page. I can't figure out how to order them, however. I tried changing the IDs so that they were ascending by numbers (ex. 01_Home, 02_Info, etc) but this didn't seem to work. Does anyone have any suggestions?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
From the plugin's config.php:
Text Formatted Code
// sort the static pages that are listed in the site's menu
// (assuming you're using a theme that uses the {plg_menu_elements} variable)

$_SP_CONF['sort_menu_by'] = 'label'; // can be 'id', 'label', 'title', 'date'
 

bye, Dirk
 Quote

djbrakez

Anonymous
I would do that, but in order to keep the menu items from appearing twice in the menu, i had to disable {plg_menu_elements} from the config file. When enable this code, each menu item is doubled. Is there another way to keep them from doubling so that I can use the {plg_menu_elements} to order the menu by ID?

Thanks for your help,
Dan
 Quote

djbrakez

Anonymous
Hey, sorry if I'm being stupid. I figured out how to keep them from doubling. I enabled the plg_menu_elements on my config file, then went into the header.thtml file and deleted {plg_menu_elements} from the code. That took the doubling away. Now all I need to do is order the menu items by ID, but I can't find that code that you told me

$_SP_CONF['sort_menu_by'] = 'label'

Where can I find this code, or do I have to enter it myself (where would I do that?)

Again, thank you for your help!

Dan
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In the plugin's config.php, as I said: /path/to/geeklog/plugins/staticpages/config.php

bye, Dirk
 Quote

All times are EDT. The time is now 07:16 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