|
|
You will noticed that a nice menustructure provides an easy
navigation through that page, but how can you create such menu bars?
The Idea is quite simple: The menustructure will be generated by using
special menu tags somewhere within the code. Then you set a generation
point, where the menustructure should be generated. If you combine that
with the Include Tag you can be provided of a lot of copying.
You can define the menubar by using two very similar tags:
the menu and the item tag.
| |
|
The informations for the navigation bar are stored in a menu tree.
This is the sheme of such a tree:
Example:
<menu>
<item name="foo" ....>
<item name="bar" ....>?
<menu name="menu_one" ....> // sub menu start
<item name="mfirst" ....>
<item name="msecond" ....>
<menu name="menu_two" ....> // sub sub menu start
<item name="in_two" ....>
</menu> // sub sub menu end
<item name="in_one" ....>
</menu> // sub menu end
<item name="outside" .....>
</menu>
|
There can only be one menu tree in a HTML page at all
(menu tree, not navigation bar!).
At the tag where the menu tree will be
generated you set the position of the current side in
the menu tree, by giving it's path. You can imagine it like
a directory on your computer with files and sub directpries inside.
Example:
// item foo
/foo
// item bar
/bar
// menu menu_one
/menu_one
// item mfirst in menu_one
/menu_one/mfirst
...
/menu_one/msecond
/menu_one/menu_two
/menu_one/menu_two/in_two
/menu_one/in_one
/outside
|
Ther are not much more to say, but if you wan't to know more
have a look at the other
Documentation
.
| |
|
The first tag i'll explain is the item tag.
One item stands for one link in the navigation bar.
Item Tag Definition:
<item
|
| (type: simple_tag) |
|
name="the name" |
|
|
|
|
|
title="The Title" |
(optional) |
|
|
|
|
href="foo.html" |
|
|
|
|
|
subdir="path/path" |
(optional) |
|
|
|
|
pre="a Text" |
(optional) |
|
|
|
|
post="a Text" |
(optional) |
|
|
|
|
pre_backwards="a Text" |
(optional) |
|
|
|
|
pre_forwards="a Text" |
(optional) |
|
|
|
|
post_backwards="a Text" |
(optional) |
|
|
|
|
post_forwards="a Text" |
(optional) |
|
|
|
|
highlight_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_type="INDENT NAVIGATION <b>TITLE</b><br>" |
(optional) |
|
|
|
|
highlight_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
indent_number="3" |
(optional) |
|
|
|
|
indent_type=" " |
(optional) |
|
|
|
|
blockquote_principe="<blockquote>MENU</blockquote>" |
(optional) |
|
|
|
|
title_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_menu_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_highlight_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
title_highlight_menu_type="<b>TITLE</b>" |
(optional) |
|
|
|
> |
|
- Name Option
-
This is the name of the item, the name it is called in the path.
- Title Option
-
The title of the item. If the title option is not set
the name of the item will be used as the title.
- Href Option
-
A link to a file, or a local anchor.
eg.: foobar.html , #foobar
- Subdir Option
-
If an Item is located in a subdirectory you can declare it
in with this option. At an item you can use this style:
href="foo/foobar.html" or this one:
href="foobar.html" subdir="foo" .
But not at a menu . More info's you'll
find down at this page.
- Pre Option
-
A text, that will be printed before the title.
- Post Option
-
A text, that will be printed after the title.
- Pre_backwards Option
-
A text that will be printed the whole menu tree down before the titel.
- Pre_forwards Option
-
A text that will be printed the whole menu tree up before the titel.
This option is not useful at the
item tag. But at the menu
tag it is useful.
- Post_backwards and Post_forward Option
-
Same as pre_forwards, but the text will be printed after the titel.
- Highlight_type Option
-
The highlight type is the principe how the link (from an item or menu) will be printed.
INDENT will be replaced by the indent value, TITLE will
be replaced by the generated link.
The generated link will be at an item the value of the title_type option.
If the item is the current one the title_highlight_type option will be
used. At a menu these options will be used: title_menu_type and
title_highlight_menu_type.
- Highlight_active_type Option
-
The current position in the menu tree will be highlighted. This
option defines the principe how it is highlighted.
The replacement sheme is like the principe at the highlight_type
option.
- Highlight_menu_type and Highlight_active_menu_type
-
Same as highlight_type and highlight_active_type but for menu's
- Indent_number and Indent_type Option
-
INDENT will be calculated with this formular: indent_number * indent_type .
In the case of indent_number is 3 and indent_type is , INDENT will be replaced
by .
- Blockquote_principe Option
-
If the block_quote option at the
here , link , or sitemap tag is set
a menu will be collected together. This is it's principe.
- Title_type and Title_highlight_type Option
-
This is the shema that will be used to generate the link that will replaces the
TITLE
at the other options.
LINK will be replaced by the name of the file or local anchor. TARGET
will be replaced by the target frame and TITLE will be replaced by the title of
the menu or item.
- Title_menu_type and Title_highlight_menu_type Option
-
Same as title_type and title_hihlight_type but for menus.
| |
|
The menu tag represents a menu. A menu collects
some items together. Many options of the menu tag are equal to
the item tag.
I'll describe only the differences here.
Menu Tag Definition:
<menu
|
| (type: open_close_tag) |
|
name="the name" |
|
|
|
|
|
title="The Title" |
(optional) |
|
|
|
|
href="foo.html" |
|
|
|
|
|
subdir="path/path" |
(optional) |
|
|
|
|
pre="a Text" |
(optional) |
|
|
|
|
post="a Text" |
(optional) |
|
|
|
|
pre_backwards="a Text" |
(optional) |
|
|
|
|
pre_forwards="a Text" |
(optional) |
|
|
|
|
post_backwards="a Text" |
(optional) |
|
|
|
|
post_forwards="a Text" |
(optional) |
|
|
|
|
highlight_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_type="INDENT NAVIGATION <b>TITLE</b><br>" |
(optional) |
|
|
|
|
highlight_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
indent_number="3" |
(optional) |
|
|
|
|
indent_type=" " |
(optional) |
|
|
|
|
blockquote_principe="<blockquote>MENU</blockquote>" |
(optional) |
|
|
|
|
title_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_menu_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_highlight_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
title_highlight_menu_type="<b>TITLE</b>" |
(optional) |
|
|
|
> |
|
A menu can be an item too, cause of that reason
most of the options are similar to the item tag.
- Title Option
-
The titel of the item. If this option is not set the menu is invisible.
this is usefule if you wan't to collect some items in one subfolder.
If you wan't to use this feature the href option must not be set too.
- Subdir Option
-
If there a menu is located in a subdirectory you can define this here.
If this option is set, you have not to set it at the item's of the menu.
Example:
// There are 3 item's in the subdirectory "foobar" and
// all of them should be collected to one menu.
<menu>
<menu name="my_menu" title="My Menu" subdir="foobar" href="my_menu.html">
<item name="item_1" title="Item 1" href="item_1.html">
<item name="item_2" title="Item 2" href="item_2.html">
<item name="item_3" title="Item 3" href="item_3.html">
</menu>
</menu>
|
| |
|
When you have defined the menu tree, you have to define a position
where it should be generated. This can be done by the here
tag.
Here Tag definition:
<here
|
| (type: simple_tag) |
|
position="/the_path" |
|
|
|
|
|
menu="/menu" |
(optional) |
|
|
|
|
blockquote |
(optional) |
|
|
|
|
localsystem |
(optional) |
|
|
|
|
target="target_frame" |
(optional) |
|
|
|
|
highlight_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_type="INDENT NAVIGATION <b>TITLE</b><br>" |
(optional) |
|
|
|
|
highlight_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
indent_number="3" |
(optional) |
|
|
|
|
indent_type=" " |
(optional) |
|
|
|
|
blockquote_principe="<blockquote>MENU</blockquote>" |
(optional) |
|
|
|
|
title_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_menu_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_highlight_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
title_highlight_menu_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
override |
|
|
|
|
> |
|
Many of these option are well known from the item tag.
So I will only explain the different once.
- Position Tag
-
This is your own current position in the menu tree.
The position of the current HTML page in the menu tree.
The default value is "/", the top of the tree.
- Menu Option
-
If the menu generation shouldn't be startet at the "/"
you can define here it's position. It would be like
moving the root. (ATTENTION, this won't have any effect to the
path's of the menu and items).
- Blockquote Option
-
Diese Option schaltet das blockquote_principe Schema an und das
Einrückschema aus.
- Localsystem Option
-
If that flag is set, only the menu of the current position will
be shown. At the other case the other toplevel items are shown too.
- Target Option
-
"The target frame".
- Override Option
-
Use the values of highlight_type, highligh_active_type, blockquote_principe,
indent_type, indent_number,... and override the settings within the menu tree.
If override is not set the values will only be used if nothing else is specified.
| |
|
A sitemap is an index of all pages of a homepage.
With the here tag you display only that branch
at which you are. The sitemap tag displays all branches.
Cause a sitemap and a menu are very similar the sitemap
tag has the same parameters as the here tag.
Sitemape Tag Definition:
<sitemap
|
| (type: simple_tag) |
|
position="/the_path" |
|
|
|
|
|
menu="/menu" |
(optional) |
|
|
|
|
blockquote |
(optional) |
|
|
|
|
localsystem |
(optional) |
|
|
|
|
target="target_frame" |
(optional) |
|
|
|
|
highlight_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_type="INDENT NAVIGATION <b>TITLE</b><br>" |
(optional) |
|
|
|
|
highlight_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
indent_number="3" |
(optional) |
|
|
|
|
indent_type=" " |
(optional) |
|
|
|
|
blockquote_principe="<blockquote>MENU</blockquote>" |
(optional) |
|
|
|
|
title_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_menu_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_highlight_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
title_highlight_menu_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
override |
|
|
|
|
> |
|
If you wanna see how a sitemap look likes click here: Sitemap
There you can also have a look on the sources, by clicking on the "Show Source"
link on the sitemap.
| |
|
From time to time you wan't to create a single link to a page somewhere
in the menutree. The simple tag you can use to realize this is the
link Tag.
Link Tag Definition:
<link
|
| (type: simple_tag) |
|
path="/the_path" |
|
|
|
|
|
position="/the_position" |
(optional) |
|
|
|
|
target="target_frame" |
(optional) |
|
|
|
|
highlight_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_type="INDENT NAVIGATION <b>TITLE</b><br>" |
(optional) |
|
|
|
|
highlight_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
highlight_active_menu_type="INDENT NAVIGATION TITLE <br>" |
(optional) |
|
|
|
|
indent_number="3" |
(optional) |
|
|
|
|
indent_type=" " |
(optional) |
|
|
|
|
title_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_menu_type="<a href=\"LINK\" target=\"TARGET\">TITLE</a>" |
(optional) |
|
|
|
|
title_highlight_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
title_highlight_menu_type="<b>TITLE</b>" |
(optional) |
|
|
|
|
override |
(optional) |
|
|
|
> |
|
Most of the options are already known, so I only explain the differences.
- Path Option
-
The path to the item or menu, that should be used to generate the link.
- Position Option
-
The current position within the menu tree. If you do not set this option
the information will be extracted out of the first found
here
tag.
Noraly this make sense. But if you haven't a menu an this page you have to
declare the position.
- Target Option
-
If you wan't to use the link tag, but the link should opened
in an other frame you can set this option.
The target option will be ignorered if the link is not a standalone
link (link with position option set).
Then the target option of the here tag will be used.
| |
|
This page was created by
King Leo
. Page generator was
Leo<HTML>
version
0.99.0
.
|