System Menus This icon is a link to the Phrase grid (found under the Database menu), but with a search filter applied, so that only phrases related to menus are listed.

A menu is a special phrase type, used for displaying all kinds of navigation lists throughout your entire site, including ACP desktop icons. There is no limit to how many menus you can have, neither to their placement or content.

Menus can:

  • be automatic or explicit
  • display graphics instead of text
  • lead to existing Sitemap nodes or to on the fly pages
  • vary among the visitor's security level
  • be embedded in your texts

In other words, they are quite flexible!

Predefined menu names

Although zoglair menus can be named and placed at will, there is a need for at least a few of them to have predefined names and semantics. This is so that web designers can create skins that apply to any site, thus making skin sharing possible.

For this reason, zoglair defines 6 (six) generic menus for a site frontend, plus 1 (one) specifically targeted to ACP desktop icons. The naming is based on the concept of dividing a web page to 6 functional areas: 3 vertically times 2 horizontally:

  • The vertical areas are head, body and foot. That is easy to remember since most sites are structured with a header, body and footer part (see Content).
  • The horizontal areas could be left and right, but that would introduce an ambiguity between LTR and RTL styled skins. That's why site and user were chosen instead, where “site” refers to links (conceptually) related to the particular site content, and “user” refers to links more or less common among sites. In LTR layouts, the “site” area is commonly put on the left, while in RTL ones that could be the opposite. Of course, nothing stops a skin designer to put a head-site menu on top, if that it is what the design calls for.

So, by joining the vertical and horizontal areas together, the following combinations (along with their and suggested usage) exist:

  1. headsite
    For the site's main menu.
  2. headuser
    For links relative to user registration, login and logout.
  3. bodysite
    For the site's secondary menu, such as the product category listings found in e-shops.
  4. bodyuser
    For the user toolbar.
  5. footsite
    For linking to supplementary pages, such as “Terms of Services” and “Privacy Policy”.
  6. footuser
    For linking to the sitemap, language indicators, style choosers, etc.

As for the menu used for desktop icons, well, it is named desktop!

Working with menus (except desktop)

Menus are written in the phrase editor, one menu item (~choice) per line. Each menu item can be one of the following:

A sitemap node
This is the most common and easy to implement menu item. You just enter the Sitemap node to link to, and zoglair automatically generates the link. For example, a link to this page would be simply entered as:
If the node has descendants, you can specify whether you want it automatically expanded or not, by suffixing the node with either a plus sign (+) or an asterisk (*). Both of these symbols will create submenus, but only the first one (+) will include the node itself (as the parent, of course). For example, let us assume a “products” node with a lot of categories and subcategories. If you would like a “products” entry on your headsite navigation bar, you should enter:
That would cause drop-down menus upon hovering over “products”. On the other hand, if you were going to display your product categories on a bodysite menu, you should enter:
It is worth mentioning that menu items generated from sitemap nodes, do respect their security level. In other words, if the node is not visible, neither the item is. Zoglair, in general, does not generate links that lead to an error page. This, by the way, is an important feature!
A custom link
This is the type of menu item to use, whenever you need a link to a non-existing node. In this case, you use the normal ZML link tag, exactly as you would use it in a text. For example, the footuser menu of this site contains the following line:
[[clip/menu/sitemap?slc=slickmap&ttl=sitemap&wid=1&max=2|{{icon1649}} Sitemap]]
If you want submenus to a custom link, you enter them underneath, prefixed by one hyphen (-) per level. For example:
If you want to access control a custom link, you prefix it by the digit that corresponds to the required security level. For example:
3[[membersOnly|Members Only]]
An item separator
This is just a single underline character:
The visual form of an item separator depends on the skin in use.
The word "this"
It is automatically substituted with the active node. For example, if any of the menus shown in this page had an item
this would be like manually entering:
If you wonder about the use of it, just think of attaching an asterisk suffix, as previously described. In such a case, you would have automatic context sensitive submenus!

Working with the desktop menu

The desktop menu is parsed way differently than described above. Each line (~menu item) consists of the following parts, separated by a comma:

  1. A 32x32 icon id
    This is the last 2 digits shown in the Icon Viewer.
  2. A label display under the icon.
  3. A link
    Wherever you want the icon to link to.
« Messages Molds »
(C) Nick B. Cassos - All Rights Reserved
powered by zoglair
page generated in 45ms (11 queries, 10ms)