webgen logo

webgen / static website generator

static website generation made easy!

Latest news

2007-12-31: Minor release with feature enhancements. More...

2007-09-08: Small bug fix release. More...

2007-06-29: Some bug fixes and one small feature enhancement. More...

Links

Generated by webgen

General Information

Plugin name:Tag/Menu (Tag/Default)
Author:Thomas Leitner <t_leitner@gmx.at>
Summary:Builds a menu
Parameters:

menuStyle (=default mandatory parameter): nil
Specifies the style of the menu.

options{}
Options that are passed on to the plugin which layouts the menu.

Handled tags:menu

Description

The menu tag is used to generate a dynamic menu for the website. You can see such a menu on the left of this page.

It uses the meta information inMenu and orderInfo to determine which pages should be in the menu and how they should be ordered. Then it generates an internal menu tree, one for each language, to speed up menu generation. When the tag is used, it is first determined which language tree should be used for the menu generation (the language of the page the menu tag appears in). After that a specific menu style is used to actually generate the menu.

There exist serveral different predefined menu styles (vertical, horizontal, ...). Have a look at the MenuStyle section to see which menu styles are available.

Static Menus

It is also possible to define a “static” menu or to augment the dynamic menu with static entries by using the meta information backing file. Following are some ideas for how to do this. Nothing is assumed, so it is valid that none or some page files have the inMenu meta information set:

  • Exisiting page files can be included in the menu by specifying the needed meta information directly (either in the source or the output section):
        features.page:
          inMenu: true
          orderInfo: 1
      
  • Virtual files and directories can be added using the output section to structure the menu the way you like it. This way it is also possible to add one page under two different headings:
        newdir:
          orderInfo: 2       -> no need to specify inMenu if a page under the dir has it specified
    
        newdir/new.page:
          orderInfo: 1       -> orderInfo for the page
          inMenu: true       -> it should be in the menu
          lang: en           -> lang has to be set explicitly if the file does not exist, and if
                                the file should only appear in the menu for one specific language:
                                if not set, it appears in every menu
          url: ../features.page  -> ../features.page is shown for this menu entry
      

A completely “static” menu can be generated by only using virtual directories and files in the output section and not setting inMenu for any node.

Examples

UsageOutput
{menu: vertical}
{menu: horizontal}