umbraco/UI-Examples

Implement "section views" for the layout of the package

Closed this issue · 1 comments

Section views should be added so that we can follow the same layout as the current package. This should use the Section Views.

This refers to the content-app style buttons at the top right.

image

The base for this is now in place on dev/v14. In order to add a new section view, the below should be added into the umbraco-package.json:

{
      "type": "sectionView",
      "alias": "example.ui.dashboard.section.boxlayout", // This should be unique
      "js": "/App_Plugins/Example.UI/scripts/sections/box-layout-section.js", // This should point to your JS file
      "name": "Box Layout", // The display name for the section
      "meta": {
        "sections": [ "example.ui.section" ], // This doesn't seem to do anything! Conditions stops it from showing everywhere
        "label": "Box Layout", // The name in the box, top right
        "icon": "folder", // The icon shown in the box, top right
        "pathname": "box-layout" // The URL for this section.
      },
      "conditions": [
        {
          "alias": "Umb.Condition.SectionAlias",
          "match": "example.ui.section"
        }
      ]
    }