• This web contains the official documentation of the TWiki Release 4.3, code named GeorgetownRelease. It is a read-only web for reference.
• This is an older release, see TWiki-6.0 for the latest release documentation.
Tags:
create new tag
, view all tags

TopMenuSkin

The TopMenuSkin adds pulldown menus to the PatternSkin.

This skin is
sponsored by:
Twiki, Inc.

Screen Shot

Click for full screen image

Tob Bar and Menu Structure

NOTE: The skin is designed to incorporate the "you are here" breadcrumb into the pulldown menus:
"Home" menu => "Web" menu => List of parent topics, if any (shown as "P"s) => Current topic ("View" menu).

Web-specific Menu-Bars

The TopMenuSkinDefaultWebTopMenu defines the default menu structure used in any web. A WebTopMenu topic in a web can redefine the default menu structure. If the WebTopMenu topic is missing in a web, create one with content of _default.WebTopMenu and customize it. Bullets must be of format [[...][...]] or <a href="...">...</a>, and may not contain any text next to the link.

To preserve the "you are here" breadcrumb, it is important to add additional pulldown menus after the INCLUDE of %SYSTEMWEB%.TopMenuSkinTopicMenu. The top level menu-bar should have this structure:

  • INCLUDE of %SYSTEMWEB%.TopMenuSkinHomeMenu
  • Current Web menu
  • INCLUDE of %SYSTEMWEB%.TopMenuSkinTopicMenu
  • Additional pulldown menu(s) as needed (optional)

Example WebTopBar menu structure with extra "Bugs" pulldown menu:

%INCLUDE{%SYSTEMWEB%.TopMenuSkinHomeMenu}%
   * [[%BASEWEB%.%HOMETOPIC%][<img src="%ICONURL{web-bg}%" border="0" alt="" width="16" height="16" style="background-color:%WEBBGCOLOR%" /> <nop>%MAKETEXT{"[_1] Web" args="%BASEWEB{format="$current"}%"}% <img src='%PUBURL%/%SYSTEMWEB%/TopMenuSkin/menu-dropdown.gif' alt='' width='14' height='16' />]]
      * [[%SCRIPTURLPATH{"view"}%/%BASEWEB%/WebCreateNewTopic?topicparent=%BASETOPIC%][ %ICON{"newtopic"}% %MAKETEXT{"Create New Topic"}%]]
      * [[%BASEWEB%.WebTopicList][ %ICON{"index"}% %MAKETEXT{"Index"}%]]
      * [[%BASEWEB%.WebSearch][ %ICON{"searchtopic"}% %MAKETEXT{"Search"}%]]
      * [[%BASEWEB%.WebChanges][ %ICON{"changes"}% %MAKETEXT{"Changes"}%]]
      * [[%BASEWEB%.WebNotify][ %ICON{"notify"}% %MAKETEXT{"Notifications"}%]]
      * [[%BASEWEB%.WebRss][ %ICON{"feed"}% %MAKETEXT{"RSS Feed"}%]]
      * [[%BASEWEB%.WebStatistics][ %ICON{"statistics"}% %MAKETEXT{"Statistics"}%]]
      * [[%BASEWEB%.WebPreferences][ %ICON{"wrench"}% %MAKETEXT{"Preferences"}%]]
%INCLUDE{%SYSTEMWEB%.TopMenuSkinTopicMenu}%
   * [[BugTracker][%ICON{bug}% Bugs <img src='%PUBURL%/%SYSTEMWEB%/TopMenuSkin/menu-dropdown.gif' alt='' width='14' height='16' />]]
      * [[NewReport][Create bug report]]
      * [[OpenBugs][Open bugs]]
      * [[ConfirmedBugs][Confirmed bugs]]
      * [[FixedBugs][Fixed bugs]]

Use TopMenuSkin Menu-Bar in Topics

A menu-bar can be added anywhere in a topic:

  • Include the "TWiki06x00.TopMenuSkin" topic - this pulls in the CSS and JavaScript needed for the menu-bar.
  • Create a nested bullet list with links:
    • The top level bullets define the menu-bar items. Bullets with/without links are supported.
    • Second level bullets define the pulldown options within a menu-bar item.
      • A second level bullet must contain exactly one link (format [[...][...]] or <a href="...">...</a>) without any text next to the link.
    • Third level bullets are not supported.
  • Enclose the bullet list with a <div class="twTopMenuTab"> tag.

Example:

%INCLUDE{"%SYSTEMWEB%.TopMenuSkin"}%
<div class="twTopMenuTab">
   * [[WebHome][%ICON{home}% Home]]
      * [[WebNotify][Subscribe]]
      * [[WebStatistics][Statistics]]
   * [[WebSearch][%ICON{searchtopic}% Search]]
      * [[WebSearchAdvanced][Advanced search]]
      * [[SearchHelp][Search help]]
</div>

Renders as:

NOTE: The pulldown menus only work if the TWiki:Plugins/JQueryPlugin is installed.

CSS and JavaScript

This section defines the CSS and JavaScript. (View Raw to see the source.)

Installation

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

  • Download the ZIP file from the Skin homepage (see below)
  • Unzip TopMenuSkin.zip in your twiki installation directory
  • To turn on the skin, write in Main.TWikiPreferences:
    * Set SKIN = topmenu, pattern
  • Test if installed
  • Note on upgrading existing TWiki:
  • Note on using this skin on TWiki 4.2 and 4.3:
    • This skin depends on TWiki 5.0 specific feature %WEB{format="$current"}% to show the current web in the Web menu. To use this skin on TWiki 4.2 or 4.3, remove the parameter from the WEB variable (to show only %WEB%), or apply patch TWiki:Item6424 (to add the format parameter feature).
    • Apply patch TWikibug:Item6430 so that Edit and Attach buttons point to the current topic instead of TopMenuSkinTopBar.
    • If you have more than 30 webs, apply TWikibug:Item6429 to limit the number of webs shown in the "Home" menu.

Creating your own look

This skin is based on PatternSkin, and the same rules for customization apply.

Skin Info

  • Set SHORTDESCRIPTION = Skin with pulldown menus in top bar

Skin Author: TWiki:Main/PeterThoeny
Copyright: © 2010, TWiki:Main/PeterThoeny, Twiki, Inc.
License: GPL (GNU General Public License)
Description: Top-menu skin
Screenshot: Click for full screen image
Preview: Preview with this topic
Base Name: topmenu,pattern
Skin Version: 2010-04-21 (v1.1)
Change History:  
2010-04-19: TWikibug:Item6413 - initial release (v1.0)
2010-04-21: TWikibug:Item6431 - fix hardcoded reference to JQueryPlugin CSS and JS; doc improvements
Dependencies: TWiki 4.2 or later; TWiki:Plugins/PatternSkin; TWiki:Plugins/JQueryPlugin
Skin Home: http://TWiki.org/cgi-bin/view/Plugins/TopMenuSkin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/TopMenuSkinDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/TopMenuSkinAppraisal

Related topics: WebTopMenu, TopMenuSkinDefaultWebTopMenu, TopMenuSkinHomeMenu, TopMenuSkinTopBar, TopMenuSkinTopicMenu, TWikiSkins, TWikiSkinBrowser, UserDocumentationCategory, AdminDocumentationCategory

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2010-04-21 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon  
This site is powered by the TWiki collaboration platform Powered by Perl 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