A navigation bar plugin

Principle

If a topic contains the key %NAVBARINDEX%, it is parsed on save for bullet lines
starting with an existing topic name, between the lines containing the keywords %NAVBARINDEX%
and %NAVBARINDEXEND% (if present, or end of topic), which creates an index to the topics.
(named .navbarcache in each web). Example:

%NAVBARINDEX%
* FirstSubTopic optionnally followed by some text
* SecondSubTopic with some other text

Indexed topics then has the tag %NAVBAR% expansed into a navigation bar.
(of the form Prev Up Next, links to previous topic, index topic and next topic).
This tag should be normally part of the skin template, you do not have to add them to your topics by hand.

It works by maintaining a cache of indexed topics in the web, updated when saving the topics.
It thus needs for the Dec 2001 release a patch to add a plugin hook on save functionality that will
be present in the next stable release (Falll 2002): TWiki:Codev/PluginHookOnSavePatch

If NAVBAR is expansed, it will be prefixed and suffixed by the corresponding arguments, if any

if graphics is not specified, the navbar is in text form, as Prev Up Next links. If set to on, it will use icons. Text will be striked out and icons will be greyed out When there is no previous or no next topic. graphics can be either the keyword on, or a string XXX that will be used to get the URL of a set of images, by appending -next,gif, -nexti.gif, .... The default, graphics="on" implies for instance: Plugins/NavbarPlugin/nav

another optional argument is size, giving additionnal parameters to the img tag for html icons when you use the graphics parameter, to giveheight and width for faster rendering for instance. Its default value (when using graphics="on" is: size="width=16 height=16"

If you want to use it, modify your skin templates to include %NAVBAR% where you want

In the standard TWiki skin, you may want to edit templates/view.tmpl, to add two lines:

%NAVBAR{prefix="<div align=right>" suffix="</div>"%

one just before the %TEXT% line, one just before the %META{"attachments"}% line

Known Issues/Limitations

All pages referenced in the index must be in the same web as the index page.

There is a possible race condition if 2 people save at the same time an index topic in the same Web. Re-saving them should do the trick.

Moving / Renaming the index or the topics is not handled. If anything goes wrong, just removing the .navbarcache and re-saving every index topic will fix thing.

Creating an entry for a non-existing topic in the index, then creating the topic will not work (as the file do not exists yet as the time of index save). Just edit/save the index once when all topics are defined to be sure.