Menus - Subcontext

The subcontext key defines the secondary, left-hand menu that sometimes appears on pages that require it. One such example is the Document page which shows a document-specific menu on the left-hand side.

To populate the subcontext section, your configuration snippet should look like this:

{
    "subcontext": {
        "items": []
    ]
}

Default Configuration

The default UI configuration for the Document looks essentially like this:

{
    "subcontext": {
        "items": [{
            "key": "document",
            "items": []
        }]
    }
}

Example - Add a New Menu Item

We can add a new menu option under the Document header by introducing a config block like this:

{
    "context": {
        "items": [{
            "key": "document",
            "items": [{
                "key": "document/custom",
                "title": "Custom Document Page",
                "uri": "{documentUri}/custom",
                "iconClass": "fa fa-custom-icon",
                "allowPermission": [
                    "read"
                ]            
            }]
        }]
    }
}