Navigation Bar Add-On
Add tabbed navigation bars to TWiki topics. A navigation bar can be defined once for a set of topics and then simply included in those topics.
Usage
1. Define Navigation Bar
Create a topic that defines the navigation bar.
- Example
MyOwnNavBar
topic content:
%STARTINCLUDE%
%CALC{$SET( ...optional parameters listed below... )}%
%INCLUDE{%TWIKIWEB%.NavBarAddOnStart}%
%CALC{$SET(topic, TopicArt) $SET(label, Art) $EXEC($GET(tab))}%
%CALC{$SET(topic, TopicBar) $SET(label, Bar) $EXEC($GET(tab))}%
%CALC{$SET(topic, TopicCat) $SET(label, Cat) $EXEC($GET(tab))}%
%INCLUDE{%TWIKIWEB%.NavBarAddOnEnd}%
%STOPINCLUDE%
- Optional parameters can be defined by setting spreadsheet variables: (default values are shown)
$SET(bga_color, #999999)
Background color of active tab
$SET(fga_color, #FFFFFF)
Foreground color of active tab
$SET(bgi_color, #DDDDDD)
Background color of inactive tab
$SET(fgi_color, #000000)
Foreground color of inactive tab
$SET(min_width, 60)
Minimum tab width in pixel
- For each tab define the link (web name / topic name) and the label:
$SET(web, %MAINWEB%)
Name of web (optional)
$SET(topic, %HOMETOPIC%)
Name of topic (required)
$SET(label, Home)
Label of tab (required) which may contain an icon
2. Use Navigation Bar
In each participating topic, include the navigation bar topic.
- Example:
%INCLUDE{MyOwnNavBar}%
See working
NavBarAddOnExample
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
NavBarAddOn.zip
in your twiki installation directory. Content: File: | Description: |
data/TWiki/NavBarAddOn.txt | Add-on topic |
data/TWiki/NavBarAddOn.txt,v | Repository of above topic |
data/TWiki/NavBarAddOnExample.txt | Example topic |
data/TWiki/NavBarAddOnExample.txt,v | Repository of above topic |
data/TWiki/NavBarAddOnStart.txt | Nav bar start topic |
data/TWiki/NavBarAddOnStart.txt,v | Repository of above topic |
data/TWiki/NavBarAddOnEnd.txt | Nav bar end topic |
data/TWiki/NavBarAddOnEnd.txt,v | Repository of above topic |
pub/TWiki/NavBarAddOn/blackpixel.gif | Image file: Black pixel |
pub/TWiki/NavBarAddOn/clearpixel.gif | Image file: Clear pixel |
pub/TWiki/NavBarAddOn/screenshot.gif | Image file: Screenshot |
pub/TWiki/NavBarAddOn/tab_l.gif | Image file: Left side of tab |
pub/TWiki/NavBarAddOn/tab_t.gif | Image file: Top part of tab |
pub/TWiki/NavBarAddOn/tab_r.gif | Image file: Right side of tab |
- Test if the installation was successful:
- The navigation bar should look like this screenshot:
- Click on the navigation bar on top to verify that the navigation is working as expected
Known Limitations
This Add-on works properly with different skins on IE, Netspace and Firefox. It works nicely with the PatternSkin shipped with the
TWiki:Codev.TWikiRelease02Sep2004, but not with the latest version of the
TWiki:Plugins:PatternSkin due to interference of the Plugin stylesheet with the table layout of the tabs.
Test this topic with the
ClassicSkin
Add-On Info
Related Topic:
--
TWiki:Main/PeterThoeny - 15 Jul 2005
Topic revision: r1 - 16 Jul 2005 - 15:51:04 -
PeterThoeny?