Custom Menu

This sample page demonstrates how a custom menu can be displayed on your page.

Implementation

There are two methods by which a custom menu can be displayed.

First method

defTop.outerHTML = wet.builder.appTop({
...
    "menuPath": "../ajax/appmenu-en.html"
...
});
                

Second method

The second method is creating the menu in the appTop section of your page. There are a few configuration options:

Note: Menu items with sub links do not have a link so that consistent behaviour is found when accessing a site through mobile or navigating a site using a keyboard. For example, on a touch screen, tapping a menu item should open the panel with the sub-links and not navigate elsewhere.

defTop.outerHTML = wet.builder.appTop({
...
    "menuLinks":[
        {
            "text":"Overview"
        },
        {
            "text":"First Section"
        },
        {
            "href": "#",
            "text":"Second Section",
            "subLinks": [{
                "subhref": "#",
                "subtext": "Subsection 1"
            },
            {
                "subhref": "#",
                "subtext": "Subsection 2"
            },
            {
                "subhref": "#",
                "subtext": "Subsection 3"
            },
            {
                "subhref": "#",
                "subtext": "Subsection 4"
            },
            {
                "subhref": "#",
                "subtext": "Second section - More",
                "acronym": "Description of abbreviation"
            }],
        }]
...
});