=== 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.2 Stable tag: 95.32 Create, organize and manage your WordPress menus and navigation lists by logically grouping your pages and categories via a drag'n drop interface. == Description == = 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. * Navigation options are integrated with WordPress Page and Category create/edit screens. * Privacy settings for all navigation items to allow/disallow access based on whether or not the user has signed in. * 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 single/multiple dropdown menus. * Multiple dropdown menus can be created from a single navigation list using dividers. * Navigation lists are theme 'independent' and reusable. * Ample css classes provided for menu and list 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 use 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, WordPress 2.2 with built-in widget support. * Compatibility tested with IE6/IE7, Firefox 2.0.0.3, Opera 9.10/9.20 (_all pc browsers only_) _For the programmer_, the plugin provides a single interface function similar to the WordPress function __wp\_list\_pages__ (only better). The interface routine returns a HTML formatted unnumbered list or select statements containing the navigation items configured within a user defined list called a Navigation Group. _For the non-programmer_, the plugin comes with convenient companion sidebar module and sidebar widget 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. Navigiation options are also integrated with WordPress Manage Page and Category screens. 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 must reside 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. 1. For WordPress 2.2 with a widgetized theme: activate the NAVT Companion Widget from the plugins page. 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. The sidebar widget is available on the plugin page. = Release Notes = *__.95.32__ _(June 15, 2007)_ >Fixed a major problem with the markup characters showing up in page and category titles. The markup characters were not 'escaped' so their presence in the XML confused the XML parser and the wheels fell off... Special thanks to Rich Leino (websitemaven) for allowing me to get onto his web site to debug the problem. *__.95.31__ _(June 12, 2007)_ >Minor corrections and updates to this readme. *__.95.30__ _(June 11, 2007)_ >_New Features_ 1. Added NAVT specific options to standard WordPress Manage Page and Manage Categories screens. Navigation options can now be updated/changed in one location. 1. Added a _private_ option to all navigation items. Setting this option means that the viewer cannot see the page/category/link or divider IF they are not logged in. 1. Pages changed to private status from the NAVT List page will change the page status from 'publish' to 'private'. 1. Items marked private are now visually indicated by the addition of a _RED HAND_ over the icon that represents the item type. 1. A new icon is used for pages that have draft status. The icon is a page containing a pencil. 1. Unpublished pages (drafts) are no longer displayed in a the site navigation list via the navt_getlist API call To appear in the list, the page must be published. Draft items can be assigned to a group but will not appear in the navigation list on the site until published. 1. Navigation groups can be split into multiple dropdown selects by placing a navigation divider in the list. The divider will cause the plugin to end one navigation dropdown (/select statement) and begin another. The divider is placed between the dropdown select statements. For example, a plain text divider can be used as a header for the dropdown that appears under it. >_Other Changes_ 1. Completely rewrote the JavaScript as classes. 1. Removed all use of private MySQL calls. 1. Removed javascript comparisons of changes to an alias name in lowercase only: "name" != "Name" != "NaMe" != "naME" .... 1. Automatic update checking is user selectable. 1. Moved the api call into its own file: navtapi.php. 1. Move the changelog into a separate changelog.txt file. 1. Several bugs were fixed. *__.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. The sidebar Widget Plugin provides up to five NAVT widgets. = 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? = K2 is a popular theme so I'm using it here only as a demonstration. The NAVT plugin can be used in any WordPress 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">