---+ Index Gen Add-On

To see the results of this example please look at the navigation bar on the left of this page :
[[http://www.flossmanuals.net/audacity]] (more on this example below).

This plugin is designed so you can quickly make an navigation 'bar' of topics in a web. 

With this Addon and customised skins you can make 'websites' from any TWiki web. It was originally designed to make the creation of published online manuals easy, allowing you to choose topics from a web to include in manual, then place headings to separate groups of chapters, make the chapter topics readable (non-wiki words), and then use a skin that includes the index you just created. Although the process is developed for online manuals it may be suitable for any number of outputs requiring a typical website navigation bar.

It uses an easy drag and drop method to generate an 'index' (a topic called _index)  which can be included in templates.  Names of each link can be defined separately to the topic name to make for nice non-wikiname navigation. 

Originally made for [[http://www.flossmanuals.net]]. 

---++ Usage

Set the format of the link to be made in the WebPreferences of the web you are working on. To do this set the <nop><verbatim>INDEXGENURL</verbatim></nop> variable to something like:

<nop><verbatim>      *  INDEXGENURL=/bin/view/%WEB%/%TOPIC%</verbatim></nop>

This would generate links in the navbar similar to this:

<verbatim>
<li><a href="/bin/view/Audacity/Introduction">INTRODUCTION</a></li>
</verbatim>

Alternatively you could use IndexGenAddOn in combination with a publishing plugin and reference and html file like so:

<nop><verbatim>      *  INDEXGENURL=/publish/%WEB%/%TOPIC%.html</verbatim></nop>

This would generate links in the navbar similar to this :

<verbatim>
<li><a href="/publish/Audacity/Introduction.html">INTRODUCTION</a></li>
</verbatim>

Once that is done go to <nop><verbatim>http://[your url]/bin/arrange/$web</verbatim></nop>

Drag and drop the topics from the selected web onto the bar on the right you can arrange them in the order you like. Double click on the topic names to change the text of the link. Separators (Headings) can be made by clicking on the '---' text.

When you have finished, press 'save' and a new topic is created (_index) on the web you are working on. If you then use an <nop><verbatim>%INCLUDE{_index}%</verbatim></nop> statement in a template the navbar will show at the appropriate place.

For best results use css to define the look and feel of the navigation bar.

The css tags look something like this (using the Audacity example):

<verbatim>
<li class="title">AUDACITY</li>
<li><a href="/Audacity/Introduction">INTRODUCTION</a></li>
<li><a href="/Audacity/DigitalAudio">WHAT IS DIGITAL AUDIO?</a></li>
<li class="heading">INSTALLING</li>
<li><a href="/Audacity/InstallingUbuntu">UBUNTU</a></li>
<li><a href="/Audacity/InstallingOSX">OSX</a></li>
</verbatim>

---+++ General Configuration

The following table shows the various configuration variables and their meaning. The first column shows the variable to use if using a TWiki preference variable (i.e. Set VARIABLE = ). The third column gives the default value if TWiki preference variable is not used.

%TABLE{ cellpadding="3" columnwidths="15%, 15%, 15%, 40%"}%
| *Twiki Preference Variable* | *Default Value* | *Example* | *Explanation* |
| INDEXGENIGNORE | | WebAtom,WebTopics | List of topics we want to ignore. |
| INDEXGENTEMPLATE | indexgen.tmpl | | Template |
| INDEXGENURL | | | |

---++ Add-On Installation Instructions

__Note:__ You do not need to install anything on the browser to use this add-on. The following instructions are for the administrator who installs the add-on on the server where TWiki is running.

   * Download the ZIP file from the Add-on Home (see below)
   * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
| *File:* | *Description:* |
| ==data/TWiki/%TOPIC%.txt== | Add-on topic |
| ==data/TWiki/%TOPIC%.txt,v== | Add-on topic repository |
| ==pub/TWiki/MochiKit/==     | !MochiKit library |
| ==bin/arrange== | Add-on script |


---++ Add-On Info

* Set SHORTDESCRIPTION = Make a navigation bar for any web with easy drag and drop operations

|  Add-on Author: | TWiki:Main.AleksandarErkalovic |
|  Copyright: | &copy; 2006, TWiki:Main.AleksandarErkalovic |
|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
|  Add-on Version: | 30 Apr 2007 (V1.000) |
|  Change History: | <!-- versions below in reverse order -->&nbsp; |
|  30 Apr 2007: | Initial version |
|  TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 (TWiki 4.0) |
|  CPAN Dependencies: | List::Compare::Functional |
|  Other Dependencies: | [[http://mochikit.com/][MochiKit]] |
|  Perl Version: | 5.005 |
|  Add-on Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% |
|  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev |
|  Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal |

__Related Topic:__ %TWIKIWEB%.TWikiAddOns

-- TWiki:Main/AleksandarErkalovic - 30 Apr 2007




















				  -- TWiki:Main/AleksandarErkalovic - 30 Apr 2007























































