TWiki Skin with UW Common Look and Feel | UWclf Nav | University of Waterloo

Skip to the content of the web site.

UWclf - Navigation Menus

UWclf Nav -- Navigation Menus

Primary Navigation Menus are kept in topics pointed to by variables PRIMARYNAV and PRIMARYSUBNAV. Both PRIMARYNAV and PRIMARYSUBNAV contain lists of links, such as:

PRIMARYNAV -- a list of main topics for a website:

SECONDNAV -- a list of subtopics within an area of the website:

Skins uw2home and uw3home include the contents of PRIMARYNAV when they display.

Skins uw2content and uw3content also include PRIMARYNAV, but insert the contents of PRIMARYSUBNAV following the line that contains the value of NAVGROUP.

By default, the values of PRIMARYNAV, PRIMARYSUBNAV, and NAVGROUP are set to %TWIKIWEB%.UWclfPrimaryNav, %WEB%.UWclfPrimarySubNav, and %WEB% respectively.

Whenever PRIMARYNAV is used, it refers to the contents of the singular topic %TWIKIWEB%.UWclfPrimaryNav, but PRIMARYSUBNAV refers to the topic UWclfPrimarySubNav in the current %WEB%, so if we were viewing a page in the Sandbox Web, the uw2content or uw3content skin might show:

Because the choice of Menu and Submenu topics are chosen and displayed via variables, you can customize how they are selected.

For example, when the value of PRIMARYNAV is set to %WEB%.MyPrimaryNav in a web's WebPreference file, then the navigation presented by uw2home, uw3home, uw2content, uw3content will be from %WEB%.MyPrimaryNav for that web.

Building on that, if you set PRIMARYSUBNAV to %NAVGROUP%MySubNav, you can control which submenu is displayed (and where) by setting the value of NAVGROUP within a topic.

Custom Example:

if MyPrimaryNav looks like

    * [[AboutUs][About Us]]
    * [[OurServices][Services]]
    * [[OtherStuff][Miscellaneous]]

and OurServices contained:

 <!-- hide any settings
    * Set NAVGROUP = Our
    * Set SKIN = uw2content
 -->

Then when we view OurServices, the menu would include the contents of OurMySubNav, and might display the equivalent of:

    * [[AboutUs][About Us]]
    * [[OurServices][Services]]
       * [[OurProducts][Products]]
       * [[OurStaff][Staff]]
       * [[OurHours][Opening Hours]]
    * [[OtherStuff][Miscellaneous]]

-- PaulMcKone - 01 Oct 2005