File: docmenu.html

package info (click to toggle)
lua-gtk 0.9%2B20100528-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,176 kB
  • ctags: 1,934
  • sloc: ansic: 9,571; sh: 373; makefile: 241
file content (29 lines) | stat: -rwxr-xr-x 833 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

<p>
The menus can be nested to multiple levels; each menu is therefore a list
of entries with filename, page title and an optional submenu.  It is defined by
the input file <code>menu.lua</code>, which must define one variable named
<code>menu</code> following this schema:
</p>

<%= inline_code [[
menu = { item, ... }
item = { "filename", "Title" [, menu] }
]] %>

<p>
Here is an example with just two levels for simplicity.  Note that for each
page being generated, a static menu is produced with the current menu item
in bold, with the "surrounding" menu items being displayed as links.
</p>

<%= inline_code [[
menu = {
    { "index", "Home" },
    { "first", "First Toplevel Page" },
    { "second", "Second Toplevel Page", {
        { "third", "Subpage of Second" },
        { "fourth", "Another Subpage" },
    } },
}
]] %>