help   |   preferences

WebMenu Specifications


WebMenus are configurations for a menu, displayed on a toolbar or other client application, which is downloaded from a web site and used by web site users as an aid in navigation. These provide an easy and natural way of finding information or topics on a web site.

A WebMenu is XML that is part of a SiteInfo file. This document describes the layout of the WebMenu section. The target audience will be both people implementing a WebMenu on their site and those who are building the display of WebMenus into a client application.

Layout

A WebMenu contains two types of information.

The first type is domain description of information, such as domain name, button name, tooltip, and similar. There are just a few possible tags, and none are required.

The second type is the menu structure. This is defined by <menu> tags. Submenus are created by <menu> tags within the parent <menu> tag. Separators are <separator/> tags.

A typical, but very simple, siteinfo.xml file would look like this.

<?xml version="1.0"?>
<siteinfo xmlns="http://a9.com/-/spec/siteinfo/1.0/">
  <webmenu>
    <name>Your Domain</name>
    <menu>
      <item>
        <text>Your Domain Home</text>
        <url>http://yourdomain.com</url>
      </item>
      <separator/>
      <item>
        <text>Search</text>
        <menu>
          <item>
            <text>Search for Dogs</text>
            <textSearch>Search for Dogs: [[:SEARCHTERMS:]]</text>
            <url>http://yourdomain.com/dogsearch</url>
            <urlSearch>http://yourdomain.com/dogsearch?q=[[:SEARCHTERMS:]]</urlSearch>
          </item>
          <item>
            <text>Search for Cats</text>
            <textSearch>Search for Cats: [[:SEARCHTERMS:]]</text>
            <url>http://yourdomain.com/catsearch</url>
            <urlSearch>http://yourdomain.com/catsearch?q=[[:SEARCHTERMS:]]</urlSearch>
          </item>
        </menu>
      </item>
    </menu>
  </webmenu>
</siteinfo>

Menu Elements

The following are the elements used in the webmenu section of the siteinfo.xml.

webmenu

definitionThe root menu XML element.
subtag ofsiteinfo
subtagsmenu, domain, name, tooltip

domain

definitionThe domain name associated with the menu. Mainly used to document the XML, but may be used by a client for display.
subtag ofwebmenu

name

definitionA name that can be displayed on a button or other user interface element, usually a shorted version of the domain name. For example, www.frogslegs.net might use "Frogs Legs".
subtag ofwebmenu

tooltip

definitionText suitable for a tooltip for a button or menu.
subtag ofwebmenu, item

menu

definitionIndicates that the contents are of a main menu (for the top most occurrence) or a new child menu is it is contained in an item.
subtag ofwebmenu, item
subtagsitem, separator

item

definitionA menu item.
subtag ofmenu
subtagsmenu, text, textSearch, url, urlsearch

text

definitionThe text of the menu item. Used unless there is a textSearch element and a search term. Note that if there is no url or urlSearch element then the text appears disabled (usually grayed) and the menu item is also disabled.
subtag ofitem

textSearch

definitionThe text of the menu item if the search box has text in it. Any occurance of the string [[:SEARCHTERMS:]] in the value is replaced with the search box text. If there is no text element then this value is used with blank search terms. Note that if there is no url or urlSearch element then the text appears disabled (usually grayed) and the menu item is also disabled.
subtag ofitem

url

definitionThe url of the menu item. Used unless there is a textSearch element and a search url.
subtag ofitem

urlsearch

definitionThe url of the menu item if the search box has text in it. Used unless there is a textSearch element and a search url. Any occurance of the string [[:SEARCHTERMS:]] in the url is replaced with the search box text. If there is no text element then this value is used with blank search terms.
subtag ofitem

separator

definitionInserts a separator in the menu.
subtag ofmenu
noteThe separator tag does not have content, so usually appears as <separator/>

Restrictions and Security

All URL's in a webmenu must point to an external site and not involve a security risk. Acceptable URL's will be for HTTP, HTTPS, or FTP resources. Hence, only URL's starting with "http:", "https:", and "ftp:" will be navigated. Specifically, this means that "javascript:" or "file:" will be ignored. The A9 implementation greys these menu items, so they are visible, but can not be selected.

There are currently no imposed size or content restrictions on WebMenus. However, it is recommended that the size of the siteinfo.xml files should be in the order of 10k to 15k, and not exceed 100k.