Most web sites use a menu to navigate. Template::TT2Site automatically creates the menu, using .map files placed in the directories to navigate. The advantage of .map files is that they can easily be maintained with the directory data, and directories can be moved to another location taking the map data with them.
This is how it works.
In your main directory (the one with the top level
index.html
in it, create a file .menu
with
contents:
title "Site Menu"Now, for each entry you want in this menu, add a line:
menu "Title" target
The target will appear in the menu as "Title".
The target can be an HTML page (if the file target.html exists), a directory (if it exists, introducing a new level of navigation), otherwise it will be taken to be an arbitrary URL.
If the target is a directory, the menu item will point to the
index.html
file in this directory. Also, if this
directory contains a .map
file, the navigation menu will
be hierarchically expanded with the items from this directory.
Note that the appearance of the actual menus is controlled by the
layout definition of the web pages (file lib/page/layout
)
and the menu (file lib/page/menu
).
The visual appearance can be controlled with the style sheet
css/site.css
. The menu items will belong to the CSS class
'menu', and the currently active link will be given the class
'menuselect'.