=== WordPress Navigation Tool (NAVT) === Contributors: gbellucci, et_ux Donate link: http://www.gbellucci.us/?p=450 Tags: menu, navigation, lists, pages, categories, links, navbar, widget, dropdown Requires at least: 2.1 Tested up to: 2.1.3 Stable tag: 95.20 Create, organize and manage your WordPress menus and navigation lists by logically grouping your pages and categories via a drag'n drop interface. == Description == = Background = Web site navigation links on your WordPress blog are typically constructed using HTML unnumbered lists (UL and LI tags) and styled by your theme's cascading style sheet. The WordPress software provides theme designers with a few basic functions that collect, format and display specific types of lists in your blog. As an example, the list containing your pages that are displayed as the horizontal menu above or below your web site header; the list of categories vertically displayed in your sidebar. Page lists and category lists are just two of the 'standard' list types that WordPress themes generally make available for navigation. Lists provide the means by which users traverse your site and without them every web site would be one very long and seemingly endless page. WordPress provided lists however, are confined to supplying only one type of object per list - all categories, all pages or all of 'something else'; never a combination of object types. From a programming point of view, providing a list of same-objects is the preferred direction to take; primarily because of the sheer number of possible list permutations that one might be expected to provide. If you want or need something that is 'situational', you can always modify your theme and make yourself happy. For some, that isn't a problem but others may be more inclined to just look for a different theme that comes very close to what they want. Unfortunately, finding a theme that is capable of displaying the navigation list that YOU have in mind is virtually impossible. = About the Plugin = The __WordPress Navigation Tool (NAVT)__ plugin is designed to provide you with complete control over the contents of your navigation links. The plugin gives you the ability to create unique navigation lists and arrange the items within the list in any order required - regardless of the theme. * One or more lists can be created from any combination of pages, categories, external links and dividers. * Items within any navigation list can be arranged in any arbitrary order. * List item names (Menu Tabs) can be shown using a name that differs from the name used in the database. * Creates navigation lists in two formats: Un-numbered HTML or dropdown menus. * Navigation lists are theme 'independent' and reusable. * Ample css classes provided for menu styling. * Single interface function call. * Comes with a companion sidebar module for Sidebar Module pLugin users. * Comes with a companion sidebar widget for WordPress Widget plugin users. * Drag and drop interface for easy visualization of your menus and quick changes. * Built-in user guide with screenshots, examples and suggestions. * Compatible with the Word Press 2.1+, [SideBar Module Plugin](http://nybblelabs.org.uk/ "Plugin Homepage") V1.0+, [SideBar Widgets Plugin](http://automattic.com/code/widgets/" Plugin Homepage") for WordPress 2.1 * Compatibility tested with IE6/IE7, Firefox 2.0.0.3, Opera 9.10 (_all pc browsers only_) _For the programmer_, the plugin provides a single interface function similar to the WordPress function __wp\_list\_pages__ . The interface routine returns a HTML formatted unnumbered list containing the category and/or page items configured within a user defined list called Navigation Group. _For the non-programmer_, the plugin comes with a convenient companion sidebar module and sidebar widget (_New for .95.1_) that can be incorporated into your __widgetized theme__. = Interface = The plugin provides a __drag 'n drop__ interface minimizing the need to use your keyboard. Navigation lists can be created and edited using your mouse along with a few keystrokes. Using this plugin with the companion sidebar module or sidebar widget provides you with the ability to __reorder and change your navigation lists on your web site without changing one line of code in your theme__. It also means that you can change themes and still retain your site navigation. = Built-in User Guide = The plugin provides an extensive built-in user guide to help you to understand how to use the plugin interface, provides an explanation for the terminology used and offers suggestions and examples for use with the companion sidebar module and sidebar widget. == Installation == 1. Download the plugin. 1. Unzip the file into the WordPress directory: `/wp-content/plugins/` - The plugin resides in its own directory. 1. Activate the NAVT plugin from the Word Press plugin page. 1. After activating the plugin, go to the `Manage` menu and select the menu tab: __NAVT Lists__ to use the plugin. 1. From the plugins admin page, select __Plugin Help__ to read the built-in user guide. The `doc` directory contains a single page manual explaining the PHP interface function call syntax. The `modules` directory contains a document explaining how to install the sidebar module and sidebar widget. = Release Notes = *__.95.20__ _(April 25, 2007)_ >_New Features_ 1. New category option to display empty categories. The default is to _not_ display empty categories. 1. Added a Navigation Group option that instructs the plugin to create a dropdown menu from your navigation group. 1. Dropdown menus support categories with appended post counts. 1. Added a plugin update notification announcement feature. The plugin will notify you when updates are available for download. 1. Updated help information including a link to a tutorial that explains how to correctly modify your theme. *__.95.12__ _(April 24, 2007)_ >Removed the references to the K2 theme - this plugin works with ANY WordPress theme (with or without widgets and/or sidebar modules) privided your WordPress intallation is 2.1 or higher. I think singling out the K2 theme has confused people into believing this plugin was written for K2 users. No functional changes in this release. *__.95.11__ _(April 23, 2007)_ >Minor corrections to the readme.txt file. - more FAQ and examples. *__.95.1__ _(April 22, 2007)_ >I believe I finally put to rest the issue with UTF-8 that has eluded me since the initial release. >_New features_ 1. The ability to add one or more external links to any Navigation Group (unrelated to the Blogroll Links). 1. The ability to add one or list dividers between navigation items using any of the following types: * An empty/blank space that can be styled to act as a separator between groups of similar/related links. * Plain Text (set to H3) for providing a subheadings between group of navigation items within the same navigation group. * A horizontal rule for creating a line between groups of navigation lists. 1. A companion WordPress compatible widget for use with the WordPress Widget Plugin 1. Updated documentation with examples. 1. Improved load performance of the administration page. 1. New icons from Mark James at [FAMFAMFAM](http://famfamfam.com/ "Silk Icons") >__NOTE:__ >This version of the plugin saves a private database option that is incompatible with previous versions of the plugin. You may have to remove any previously created navigation groups by clicking the "Remove Data" button from the NAVT Admin Plugin Page and then reconstruct your navigation groups. (_sorry_) >__This is not a release candidate__. I have a few more ideas and I'm probably going to change this again in a few weeks. I hope to get more feedback. >__I'd like to thank Luciano Passuello for his help in confirming that the UTF-8 issue went away and Timo ‘lino’ Kissing for alerting me to the problem to begin with.__ *__.94rc1__ _(April 7, 2007)_ >Fixed a problem in determining the current page item in the navigation lists. Bumped the version number. *__.93rc4.2__ _(April 5, 2007)_ >More updates to this readme text. *__.93rc4.1__ _(April 4, 2007)_ >Update of this readme text. *__.93rc4__ _(April 4, 2007)_ >Added missing title= to login/admin href in navigation list. Update of this readme text with more detailed information and screen shots. *__.93rc3__ _(April 3, 2007)_ >Built-in help information was moved to its own page. Reading the additional text for the help causes IE 7 to display this message: >__"A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?"__ >to avoid the issue completely, I've changed the way the help is displayed. *__.93rc2__ _(April 2, 2007)_ >Initial release candidate available from the plugin repository. == Frequently Asked Questions == = Does the Sidebar Module work with the WordPress Widgets Plugin? = __Yes.__ The NAVT sidebar module was written to work with both the [SideBar Module Plugin (SBM)](http://nybblelabs.org.uk/ "Plugin Homepage") written by Ben Sherratt and the [SideBar Widgets Plugin](http://automattic.com/code/widgets/" Plugin Homepage") for WordPress 2.1. The SBM plugin allows multiple copies of a widget to be used in a theme while the sidebar Widgets Plugin only supports a single instance of the companion widget. = The NAVT Admin menu appears on the plugin page, what is that for? = Two NAVT menu entries are added to WordPress by the plugin. The menu tab that appears on the `Manage` page is used to manage your navigation lists. The menu tab on the plugin page is used to cleanly remove the NAVT plugin data from your WordPress database prior to deactivating the plugin for eventual removal. It can also be used to completely reset the plugin data so you can create a new set of navigation lists. _If you wish to deactivate the plugin but don't want to lose your navigation list definitions then don't use this feature._ = I changed a page title and a category name but the menu entry on my web site was not changed. = Menu tab titles or items that appear in your list names are not directly linked to your page titles and category names. Instead, the name that appears in your tabbed menus or lists is an alias and is changed by modifying the menu alias for the item in the NAVT plugin. Initially, the menu alias is taken from the page title or category name. However, if you change the page title or category name via __`Manage` » `Pages`__ or __`Manage` » `Categories`__, the menu tab or list entry __will remain unchanged__ until you change the menu alias. The inverse is also true. Changing the menu alias will not affect the actual page title or category name as it is stored in the database. = Oh No Mr. Bill! Some of my categories are not showing up in my category list. = I'm assuming that the categories that are _missing_ are used in a menu or list you created using the NAVT plugin. Categories that appear as part of a navigation list created using the NAVT plugin are, by default, __excluded__ from the normal list of categories displayed by your WordPress template. _This is by design._ In addition, if a category contains sub-category entries, the sub-categories will also be excluded from your category list. Because the parent category appears as part of another navigation list on the web site, including the category in the normal category navigation list can appear 'confusing' to visitors. _If you want categories to be included in your list of categories:_ 1. Click on the name of the category menu item, a box will open to reveal the menu item options. 1. Select the checkbox: __Show in category list__. 1. Click the __ok__ button. The category will now appear in __both__ locations. = WordPress can display the number of posts in a category by appending the count to the end of the name. Can I do that with this plugin? = __Yes.__ One of the menu item options enables this feature: 1. Click on the name of the category menu item, a box will open to reveal the menu item options. 1. Select the checkbox: __Append post count__. 1. Click the __ok__ button. It is also possible to style the count independently of the category list item. Add the class 'catcount' to your theme's style sheet. = I can't fit all of my menu items across the top of the page. I have to rename my categories and pages to make my menu look right. = Using this plugin makes it possible to leave the names of your categories and the titles of your pages intact and change only the names that are displayed in your menu. How? Change the menu item alias for the menu item. The menu item alias is initially the name you've given a category or page but you can change the alias and not affect the actual category or page title. 1. Click on the name of the category menu item, a box will open to reveal the menu item options. 1. Type in the new name in the textbox provided. (_No spaces, alphanumeric only at least 2 characters in length_). 1. Click the __ok__ button. Your menu tab will contain the new name. = How do I create a menu on the top of my web site and one on the sidebar? = 1. Begin by creating a navigation list called _navbar_ from the __NAVT Lists__ page. Drag the page or categories from the _unassigned_ group and drop them into the _navbar_ group. Put them in the order you want them to appear on the page. __Apply__ your changes when you're done. 1. Create a second navigation group called _sidebar_. Drag the pages or categories from the _unassigned_ group and drop them into the _sidebar_ group. __Apply__ your changes. 1. __If you are not using the companion sidebar module__ : * add the function call `navt_getlist('navbar');` to the location in your Word Press template (_usually header.php_) where the navbar is to be displayed. * add the function call `navt_getlist('sidebar');` to the location in your template (_usually sidebar.php_) where the sidebar navigation list is to be displayed. 1. __If you are using the companion sidebar widget__: _(New for .95.1)_ * Locate the `WP Navigation Tool (NAVT) Companion Widget` in the list of available plugins on your plugin page - activate the plugin. * Go to the Presentation Menu and select the 'Sidebar Widgets' menu tab. * Look for the `NAVT WP Widget` located under Available Widgets * Using the mouse, move the widget into the dynamic location used for your theme's navbar. * Open the widget by clicking the icon in the right top corner of the widget. * If you have created Navigation Groups using the NAVT Plugin, the available groups will appear in the dropdown box * Select the navigation group to be used. * Close the widget * Click __Save__. 1. __If you are using the companion sidebar module__: * Locate the `NAVT Companion Sidebar Module` in the list of available modules on your __SBM plugin administration page__. * Add the `navt module` to the dynamic sidebar column that will be used for your _navbar_ menu. * Click the newly added `navt module` and configure it to use the _navbar_ navigation group by selecting _navbar_ from the __dropdown list__. * Turn __off__ the display __title__ option and click __Save__. * Add another copy of the `navt module` to a dynamic sidebar to be used for your _sidebar_ menu - provide it with a meaningful name (title). * Configure the second `navt module` to use the _sidebar_ navigation list using the dropdown list. * Leave the title __on__ . * Click __Save__. Add the necessary menu styles to your template stylesheet. Styling information is provided in [style notes](http://wordpress.org/extend/plugins/wordpress-navigation-list-plugin-navt/other_notes) = My K2 theme 'loves me like a kitten'. How can I use this plugin to display a navbar at the top of my K2 theme? = The following code snippet is from the __K2-095rc1__ source code. The statements shown here begin on __line 75 of the K2 header.php file__

_________ __Modify the code above to look like the snippet below.__ _Note the conditional statement that surrounds the K2 UL with the class "menu"_.
__________ The additional code assumes you've used the NAVT plugin to create the navigation group __navbar__. If you are not using the NAVT plugin, the code above will use the standard K2 navbar, otherwise it will use the __navbar__ group you created with the NAVT plugin. If you've changed your __home__ menu tab to read something other than __home__ in your K2 theme, you can change the __menu alias__ from the NAVT plugin for the __home__ menu item to your preferred menu tab name. You can also add the __login__ menu item to your __navbar__ group to have the __login__ or __admin__ menu item displayed as it is in the K2 theme; or leave it out and put it somewhere else. = What do I add to my theme to get a navigation group displayed? = The short answer is to locate the function call in your theme. Add the following replacement code: Replace 'name-of-your-navigation-group' (in the example above) with the name you used when the navigation group was created using the NAVT plugin. Always test for the existence of any plugin function call before you use it. The ELSE clause above will insure that if you deactivate the NAVT plugin your theme will continue to work as before. For those of you who are not PHP programmers, I've written a tutorial on how to correctly add the NAVT Interface PHP function: `navt_getlist` to any WordPress theme. The link to the tutorial is on the plugin home page under the section named Looking for Help? A link to the tutorial is also provided [here](http://www.gbellucci.us/?page_id=472 "How To... NAVT Plugin") = Can I add a title or sub-heading above my navigation list? = __Sure.__ The NAVT Plugin interface function call takes an argument that allows you to add any HTML before the navigation group is created. You can add a title above the navigation group by entering the following code: Group Name'); } else { // Use the standard WordPress function call to display pages // if the NAVT plugin is deactivated wp_list_pages( ... ); } ?> The second argument of the function call is a boolean argument that instructs the NAVT plugin to output the HTML directly to the page (the default value is true). You must enter the second argument of the function call to use the third argument which is an HTML string that you want displayed before the navigation group is created. In the example, I've added the words "Group Name" wrapped in an HTML h3 tag. __You can also add class or id information to the H3 tag:__ navt_getlist('name-of-your-navigation-group', true, ''); __You could also add an image:__ navt_getlist('name-of-your-navigation-group', true, 'navigation'); __Be very careful when creating the HTML that will be displayed above the navigation group. Incorrect HTML or HML tags that are not properly closed will likely "break" your theme layout.__ = How do I tell the plugin to use paragraph HTML tags and not use an unnumbered list? The NAVT plugin interface function call is extremely flexible when it comes to constructing navigation groups to work with your stylesheet. The function call takes arguments for specifiying the tags you wish to use when it builds the navigation group. The function call syntx is: navt_getlist( $sNavGroupName, $bEcho=true, $sTitle='', $sBefore='ul', $sAfter='/ul', $sBeforeItem='li', $sAfterItem='/li' ) __where:__ $sBefore and $sAfter arguments specify the tags used before and after the navigation group is constructed. $sBeforeItem and $sAfterItem are the tags used before and after each navigation item. ________ Notice that the tags are specified _without_ the starting and ending angle brackets (< and > symbols). To use paragraph tags, you could wrap the entire navigation list inside another `div`. This example will build the navigation group with the name 'sidebar' : navt_getlist( 'sidebar', true, '', 'div', '/div', 'p', '/p' ); __would produce a navigation group that looked like:__ ________ __To add a class to the inner `div`:__ navt_getlist( 'sidebar', true, '', 'div class="inner_div_class"', '/div', 'p', '/p' ); __will produce:__ ________ __More complicated HTML tag combinations can be constructed as in:__ navt_getlist( 'sidebar', true, '', 'div class="inner_div_class">