Current version: 1.2
This is a plugin for WordPress which allows you to display custom navigation menus (for applying different styles and highlighting) for pages.
These are the list of features available in the current version.
WordPress arranges the pages in a hierarchical manner (similar to a tree structure), so some of the ‘Settings’ for this plugin are based on that tree. Following is a sample tree that will be used to explain some settings later in this document.
Note: The values in brackets are their Page numbers.
root (0)
|
|-- About (1)
|
|-- Services (4)
| |
| |-- Software Solutions (6)
| | |
| | |-- Products (10)
| | |-- Support (11)
| | |-- Clients (12)
| |
| |-- Web Design (9)
| | |
| | |-- Style (15)
| | |-- Technologies (18)
| | |-- Portfolio (16)
|
|-- Contact (2)
Now we’ll look at each setting. Please note that each setting is explained assuming that the rest of the settings are set to their default values.
Root page number – This will specify which page number to be treated as the root page number for the navigation list generated by ‘navigo’. The default value is zero, which is the root page of the actual navigation tree.
E.g. If the ‘Root page number’ is set to ‘4′, the list will contain all its child elements, but not the parent Page. The out put will be,
|-- Software Solutions (6)
| |
| |-- Products (10)
| |-- Support (11)
| |-- Clients (12)
|
|-- Web Design (9)
| |
| |-- Style (15)
| |-- Technologies (18)
| |-- Portfolio (16)
No of child levels to show (from root) – This will specify how many child levels to show starting from the ‘Root page number’ that was specified in the above setting. The default value zero, will display all child levels.
E.g. If the ‘No of child levels to show’ is set to ‘1′, the list will only contain the first level of child Pages of the tree, but not the root Page. The output will be,
|-- About (1)
|
|-- Services (4)
|
|-- Contact (2)
No of top levels to hide (from root) - This will specify how many child levels to hide from the tree starting from the ‘Root page number’ specified. The default value zero, will not hide any top levels.
E.g. If the ‘No of top levels to hide’ is set to ‘2′, the list will contain all the Pages of child levels excluding the first and second levels. The output will be,
|-- Products (10)
|-- Support (11)
|-- Clients (12)
|-- Style (15)
|-- Technologies (18)
|-- Portfolio (16)
Display collapsing tree – This is a toggle option, when unselected, ‘navigo’ will show all the Page links in the list(subjected to the above settings) which are and are not parent/child Pages of the current Page. When this is selected, ‘navigo’ will only show the parent and child nodes of the current page, leaving out the others.
E.g. If the ‘Display collapsing tree’ is NOT selected, and the Page that is currently displayed is ‘Support’ (Page 11), the output will be,
root (0)
|
|-- About (1)
|
|-- Services (4)
| |
| |-- Software Solutions (6)
| | |
| | |-- Products (10)
| | |-- Support (11)
| | |-- Clients (12)
| |
| |-- Web Design (9)
| | |
| | |-- Style (15)
| | |-- Technologies (18)
| | |-- Portfolio (16)
|
|-- Contact (2)
And if the ‘Display collapsing tree’ IS selected, and the Page that is currently displayed is ‘Support’ (Page 11), the output will be,
root (0)
|
|-- About (1)
|
|-- Services (4)
| |
| |-- Software Solutions (6)
| | |
| | |-- Products (10)
| | |-- Support (11)
| | |-- Clients (12)
| |
| |-- Web Design (9)
|
|-- Contact (2)
Page order – This will specify in which or to present the Pages in each level. If ‘Alphabetical Order’ is selected, each level will be sorted in the Alphabetical order, and if Page Order is selected, each level will be sorted by the Page order specified for each page.
Level n Class/ID: This specifies a custom Class/ID name for each level specified by ‘n‘. The selection of Class or ID to use will be automatic based on the selection of the setting ‘Display collapsing tree’. If it’s selected, IDs will be used, otherwise Classes.
More » / « Less: This will allow you to specify more Class/ID names for deeper navigation trees.
If you have any question or have found a bug in this plugin, please contact me, and I’ll bet back to you as soon as possible.
[...] Navigo Normalerweise ist die Seitennavigation in Wordpress statisch, und alle Seiten werden ausgeklappt dargestellt. Mit dem Navigation-Plugin Navigo lassen sich aber sehr einfach horizontale und vertikale Menus erstellen die ausklappbar sind. [...]
Hi. Is this Plugin compatible with WP 2.8?
Hi Guys, this plugin is now compatible with WordPress 2.9 as well! Enjoy!
Hi!
I’ve just wondered why the navigo( function does not support to exclude given pages (because the wp-command which is used “get_pages” supports the exclusion) so I quickly added the “exclude” parameter as follows:
Added at the begining of the navigo methode:
if (!isset($r['exclude'])) $r['exclude'] = ”;
and this after where the $pages_params get the sort_column appended:
if(strlen($r['exclude']) > 0){
$pages_params = $pages_params.’&exclude=’.$r['exclude'];
}
So to avoid of having the page 3 in the navigation you can simply add &exclude=3 to where you call the navigo function
Greetings from Austria
Wolfgang
Very good point, thanks! I’ll integrate that to the plugin on the next release. Cheers!
@wolfgang or an other one who can help me,
i’ll be exclude some pages, but your code will not be work correctly on my site. Is this code OK? or have i a missing. Can you give a complete example please?
php if (!isset($r['exclude'])) $r['exclude'] = “”; if(function_exists(‘navigo’)) navigo(’sort_column=post_title&exclude=11′); if(strlen($r['exclude']) > 0){
$pages_params = $pages_params.’&exclude=’.$r['exclude'];
}
Thanks a lot for navigo it’s really very nice plugin!
@theo
I posted the modified navigo (including the exlude stuff) here: http://pastebin.com/2JSFN2ni
[...] it does not support more than two levels, which was not meeting the client’s requirements. Navigo 1.2 offers XHTML strict output, works with WPML and offers custom classes and IDs for formatting the [...]