UserGuide: Menu plugin

This revision is from 2009/08/04 22:44. You can Restore it.

Menu plugin provides simple yet flexible way to create one level menus.

Simple usage(Edit)

  [Admin plugin|UserGuide: Admin plugin]
  [Main page]

Result is visible on the right.

Styles, format ...(Edit)

Format of the menu is defined in a file plugins/Menu/default.html, let's take a look on it:

<div class="tagCloud" style="width:auto;padding-bottom:0px;">
<b style="font-variant:small-caps;">Navigation</b><br />
<ul style="padding-left:20px;">
	<li class="{class}" title="Go to {name}">
		<a href="{link}">{name}</a>

It is basically pure HTML + CSS (+ whatever) + some special tags. The most important is {item} and {/item}. This defines part of the template which contains items of the menu, i.e. part which will be repeated.

Inside this part, you can see other tags. {name} and {link} are self explanatory.

{class} is more interesting. For exact styling, you often need to style first and last element of a menu in a special way. Menu plugin automatically replaces {class} tag with classes "first" and "last" when appropriate (in case of one item, it has assigned both "first" and "last" classes).

More menu templates(Edit)

It's quite possible that you'll need more than one type of menu. In this case, you can create other template file in plugins/Menu directory and use special syntax:

{menu(special.html) [A] [B] [C] [D]}