Most web sites use a menu to navigate. Template::TT2Site can automatically create this 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 .map
with
contents:
title "Site Menu"Now, for each entry you want in this menu, add a line:
menu "Title" target
The item will appear in the menu as "Title".
The target for a menu choice is deducted as follows.
index.html
in this directory. If this
directory contains a .map
file, the navigation menu will
be hierarchically expanded with the items from this directory,
introducing a new level of navigation;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'.