UserGuide: Creating navigation menus

This revision is from 2009/02/24 17:06. You can Restore it.

Navigation menus are quite advanced topic in LionWiki because you'll need to know Subpage mechanism and probably little bit of HTML too.

There are two options:

I want one menu in every single page(Edit)

Probably the best way to do this is to include your menu into HTML template (e.g. template_dandelion.html).

Now again, two ways to do this (in HTML):

  1. create page (called e.g. "myMenu") and write menu in it and then put {include:myMenu} into the template on the right position.
  2. just write actual menu right into the template file

The first way has obvious advantage in that you don't have to connect to your FTP if you want to edit menu, you can do it easily within your browser.

I want different menus in different pages(Edit)

This is a little bit more complicated but you can also create e.g. tree navigation menus ...

So, first thing you need to do is to create page, write menu in it and save it. In this case, you can use both HTML and LionWiki syntax. However, you'll probably want to write it in HTML as menu should have distinctive appearance, should be floating on the right etc.

Let's see example of such "menu page":

{html}
<div class="tagCloud" style="width:auto;padding-bottom:0px;">
<b style="font-variant:small-caps;">Navigation</b><br />
<ul style="padding-left:20px;">
  <li><a title="Basic information, news" href="?page=&action=">Home</a></li>
  <li><a title="Installation" href="?page=UserGuide:+Installation">Installation</a></li>
  <li><a title="Graphic templates" href="?page=Appearance">Appearance</a></li>
  <li><a title="User guide to LionWiki" href="?page=UserGuide">UserGuide</a></li>
  <li><a title="Syntax reference" href="?page=Syntax+reference">Syntax</a></li>
  <li><a title="Discussion board" href="/forum/">Forum</a></li>
</ul>
</div>
{/html} 

Important thing is that you need to enclose the menu with {html} tag.

Next thing is that you need to include the page in every page you want it to be in, syntax is like this:

{include:myMenu} 

And that's it.