More on menus

These examples demonstrate more complex areas on menus, like javascript menus that replaces page content without reloding the page.

Menus are defined by its header and data. The data is normally an array of name => link pairs, but the array values (link) are not restricted to being strings. An array containing keys mapping standard attribute names is another possibility:


Array
(
    [head] => Menu
    [data] => Array
        (
            [Link 1] => Array
                (
                    [onclick] => open_content(event, 'files')
                )

            [Link 2] => :target-id:script.php
            [Link 3] => Array
                (
                    [href] => script.php
                    [title] => Some description text
                    [style] => color: green; text-decoration: underline
                )

            [Link 4] => Array
                (
                    [href] => #
                    [onclick] => window.location = script.php
                    [class] => w3-button w3-blue
                )

        )

)