Skip to content

Submenus: Allow overriding course boxmenu options #224

@swashbuck

Description

@swashbuck

Subject of the enhancement

When using submenus by setting a content object's _type to "menu", the course _boxmenu settings are applied to the page. For instance, there is currently no option to use a different menu header or page graphic. This can help differentiate the appearance of the main menu from a submenu which increases usability.

It would be useful to be able to override any or all of the _boxmenu object properties on content objects. For instance, add to a content object of _type "menu" in contentObjects.json to override course.json settings:

"_boxMenu": {
    "_graphic": {
        "alt": "",
        "_src": "course/en/images/logo-graphic-submenu.jpg"
    },
    "_backgroundImage": {
        "_xlarge": "course/en/images/example-submenu.jpg",
        "_large": "course/en/images/example-submenu.jpg",
        "_medium": "course/en/images/example-submenu.jpg",
        "_small": "course/en/images/example-submenu.jpg"
    },
    "_backgroundStyles": {
        "_backgroundSize": "contain",
        "_backgroundRepeat": "repeat",
        "_backgroundPosition": "center center"
    },
    "_menuHeader": {
        "_textAlignment": {
            "_title": "left",
            "_body": "center",
            "_instruction": "right"
        },
        "_backgroundImage": {
            "_xlarge": "course/en/images/example-submenu.jpg",
            "_large": "course/en/images/example-submenu.jpg",
            "_medium": "course/en/images/example-submenu.jpg",
            "_small": "course/en/images/example-submenu.jpg"
        },
        "_backgroundStyles": {
            "_backgroundSize": "contain",
            "_backgroundRepeat": "repeat",
            "_backgroundPosition": "center center"
        },
        "_minimumHeights": {
            "_xlarge": 500,
            "_large": 500,
            "_medium": 400,
            "_small": 200
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions