TWiki> TWiki Web>NavBarAddOn (16 Jul 2005, PeterThoeny? )EditAttach
Nav-Bar Add-On
TIP Example
Nav-Bar Start
Nav-Bar End
 

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) MOVED TO... Background color of active tab
    $SET(fga_color, #FFFFFF) MOVED TO... Foreground color of active tab
    $SET(bgi_color, #DDDDDD) MOVED TO... Background color of inactive tab
    $SET(fgi_color, #000000) MOVED TO... Foreground color of inactive tab
    $SET(min_width, 60) MOVED TO... Minimum tab width in pixel
  • For each tab define the link (web name / topic name) and the label:
    $SET(web, %MAINWEB%) MOVED TO... Name of web (optional)
    $SET(topic, %HOMETOPIC%) MOVED TO... Name of topic (required)
    $SET(label, Home) MOVED TO... 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:
      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

Add-on Author: TWiki:Main/PeterThoeny
Add-on Version: 15 Jul 2005 (v1.000)
Change History:  
15 Jul 2005: Initial version
CPAN Dependencies: none
Other Dependencies: TWiki:Plugins.SpreadSheetPlugin version 17 Jun 2005 (1.018)
Perl Version: 5.005
License: GPL
Add-on Home: http://TWiki.org/cgi-bin/view/Plugins/NavBarAddOn
Feedback: http://TWiki.org/cgi-bin/view/Plugins/NavBarAddOnDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/NavBarAddOnAppraisal

Related Topic:

-- TWiki:Main/PeterThoeny - 15 Jul 2005

Topic revision: r1 - 16 Jul 2005 - 15:51:04 - PeterThoeny?
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.NavBarAddOn