Inhoud
How to edit the menus
The menus of the WTT web system are generated out of a menu file. This file uses an own syntax which supports mega menus and fat footers. The fat footer is a subset of the mega menu entries. But you may also add special items to the fat footer which are not in the mega menu.
To “feel” how it works, look at the current english menu
Menu Syntax
Groups
The main idea of the menu syntax is
- to define groups
- to add items to a group
- to add items with names like “Publications” and a values.
- A value could be a weblink or a link to another group
A group is defined as a simple text with “[” and “]” around and following items (see also naming convention)
[this is a group] ;the name of this group is "this is a group"
An item is a pair of name and value separated by an “=”
this is a item as simple text = and this is the value of this item
A simple text is a text without special chars like '()&=!“ … (see also naming convention)
don't use these chars for simple (menu-)text!
The group stops, if the document end or another group starts. Groups will be shown in order of appeareance. To change this order for footer use _footer_pos to set the footer position of the current group.
_footer_pos = 2 is of the current group
Footer respects only the highest menu level and one level below.
The options group
[options] is a special group. This group generates no menu entry. In options the order of top menu entries can be reversed with “reverse_menu = true”. Have a look to example
A simple item name without an link produces an footer headline.
[options] What are you looking for? = ;this is a footer headline
Comments
Comments starting with semicolon and are working until the end of line
; this line is a comment
Links
Links to internal Wiki pages:
- ”/this/is/a/link” is a absolute link to ”/this/is/a/link”
- “test” is a relativ internal link for ”/<language>/web/test“
Links to external web pages:
- "www.worldteachertrust.org" is a web link because starting with “www.” Then http is used as protocol
- "https://www.site.net" is a web link with protocol https
The value of an group item could be an internal or an external link
link = "the/link" ; example to an internal link
A link to a sub menu is initiated by the sub menu name as item name and the item value ”→“
submenu = -> ;references to a submenu as group [submenu name]
To define the link for the current group just do it that way
_link = "/link" ;is a link for the current group
A group without link is like a header (h3)
Links to the book descriptions
There are links which don't show up in the browser field with normal navigation, the links to the book sections. If you want to translate / edit the texts in the book description, you can do so by adding the name of the section with a - :
"www.worldteachertrust.org/en/web/publications/kpk-general"
The link leads to the general section, for editing, to enter into the admin. There are the following sections: -general, -healing, -meditation, -astrology, -wisdom, -masters.
You have to enter the sections from a link with
"www.worldteachertrust.org/en/web/publications/kpk" or "www.worldteachertrust.org/en/web/publications/ek",
you cannot enter with a link which contains “overview”.
Naming convention
Group names and item names have to be simple text without special chars like '()&=!” … If you are using that characters the menu parser will fail.
But sometimes you will need special chars in menus (think about if they are really needed).
If needed you have the following option for renaming the menu entry:
- for groups use:
_name = “it's a really ugl(y)! name” - for links use:
link name = “the/link|extra link name” is a link to “the/link” with “extra link name” as caption. All such link names in one group have to be different.
If you don't need a header for a subgroup because you need only grouping property then set the following to properties in the subgroup:
- _name = “”
- _nosubheader =
Items
An item is a pair of item name and item value separated by an “=”
this is a item as simple text = and this is the value of this item
An item used in a sub menu has usually the format of a header. To have only a simple link in this situation just add “_simple_link” to the item value.
item name = _simple_link "link/to/page" is a simple link and not a header (link)
The keyword “_menu” restricts items for top menu. This keyword may also useful for restricting groups. [_menu It is only for top menu] is a group “It is only for top menu” which is only used in top menu. Especially _menu_columns sets the number of colums of a top menu entry. Allowed are 1 to 4 columns.
_menu_columns = 3 means: the current top menu entry has 3 columns
In the same way the keyword “_footer” restricts items for footer. Especially _footer_pos sets the group position in the footer menu
