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/custommenu-eng.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": [{
        "id": "link1",
        "text": "Link 1",
        "subLinks": [{
            "subhref": "#",
            "subtext": "SubLink 1"
        },{
            "subhref": "#",
            "subtext": "SubLink 2"
        }]
    },{
        "id": "link2",
        "text": "Link 2",
        "subLinks": [{
            "subhref" : "https://www.google.ca/",
            "subtext" : "This link"
        }]
    },{
        "href": "#",
        "text": "Link 3",
        "acronym": "Description of abbreviation"
    }]
...
});