Navigation Menu Wiki Macro (Deprecated)

Version 40.1 by Ecaterina Moraru (Valica) on 2019/05/15 17:54

cogThis wiki macro allows you to create a horizontal or vertical navigation menu without modifying the current skin
TypeXAR
Category
Developed by

Flavius Olaru, xwiki:XWiki.cmarcoin, Nicolas Lemoine, Raluca Stavro, Ecaterina Moraru (Valica), Florian VĂ©ron

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

3.1

Description

This is a custom navigation menu wiki macro that allows you to add a navigation bar on header, left panels or right panels.

Starting with XWiki 5.1 the menu wiki macro is provided by the Menu Application.

This extension is experimental and not supported by the XWiki Development Team. It was written during the XWiki Seminar Hackathon 2011. It is compatible with the Colibri Skin but not the Flamingo Skin.

Vertical menu example

{{menu type="vertical" position="right" id="panelmenu"}}
* [[Main>>Main.WebHome]]
* [[Sandbox>>Sandbox.WebHome]]
** [[Sandbox.TestPage1]]
** [[Sandbox.TestPage2]]
** [[Sandbox.TestPage3]]
* [[Blog>>Blog.WebHome]]
{{/menu}}

Horizontal menu example

{{menu type="horizontal" id="horizontalmenu"}}
* [[Home>>Main.WebHome]]
* [[Sandbox>>Sandbox.WebHome]]
** [[Sandbox.TestPage1]]
** [[Sandbox.TestPage2]]
* [[Blog>>Blog.WebHome]]
** [[Blog Archive>>Blog.Archive]]
** [[Blog Categories>>Blog.Categories]]
{{/menu}}

It can be inserted in a xwiki document or in a panel. In a xwiki document it will show only when viewing that document, while if you define the panel in a wiki it will show in all wiki.

{{menu type="" id="" position=""}}
xwiki syntax 2.0
{{/menu}}

Parameters:

  • type: horizontal or vertical
  • id: the id of the navigation menu, used to add more than on navigation menu
  • position: left or right, used for to specify if for left panels or right panels.

Screenshots

Horizontal menu

menu-top-left.png

Vertical left menu

menu-left.png

Vertical right menu

menu-right.png

Branches

A modified version of this macro was used on www.xwiki.org, see XWikiOrgCode.MenuMacro-branch-xwikiorg.1.xar. The code was optimized for the horizontal menu layout and favored JavaScript to a CSS only code.

xwikiorgmenu.png

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Install xar.

Release Notes

v1.2

  • display menu macro only when document is loaded (and avoid the display of the options when menu is loading)

v1.1

Experimental wiki macro

  • fixed horizontal display 
  • fixed the vertical display
  • making the menu work in multiwiki environment
  • small typo fix
Tags:
    

Get Connected