HTML Navigation Menu

Most targets that generate HTML pages, will use an HTML template. In the template, you can include a navigation menu:

  #include($menu_template)

In the plugin configuration, you will need to set the menu attribute:

  mypages.menu = "mysite.menu"

In this case, the file mysite.menu contains a description of the menu. For example:

menu = Menu(
	Item("Home", "/index.html"),
	Item("Features", "/features.html"),
	Item("Download", "/download.html"),
	Item("Manual", "/manual/index.html"),
	Menu(
		Item("Config","/manual/config.html"),
		Item("Build","/manual/build.html"),
		Item("Test","/manual/test.html"),
		Item("Publish","/manual/publish.html"),
		),
	)

The .menu file is just another Python script, which means that you can generate very sophisticated (or complicated) menus if you like. The menu is generated by a template, which is included with the plugins, although if you like, you can specify your own plugin using the menu_template attribute in your plugin configuration.

The HTML-code that is included is based on the Listamatic code, except that instead of id, I have used the class attribute. This means that you will have to slightly change the CSS examples on the Listamatic site.