Hide Components and Section Layouts for a Theme

By default, all components and section layouts are available to the people developing a site. There may be times when you want to hide a component or section layout so it is unavailable when using a particular theme. For example, if you want to promote a consistent look and feel that doesn't use any button components or slider section layouts, you can hide them in a theme by editing the theme's components.json file.

To hide components and section layouts in a theme:

  1. In Oracle Content and Experience, click Developer in the left navigation menu.
  2. On the Developer page, click View All Themes.
  3. On the Themes page, select the theme to modify and click Open.
  4. Select the components.json file and click Download.
  5. Open the components.json file in a text editor.
  6. Add objects to specify the component type and ID, and set the property hidden equal to true.
    For example, the following is an example entry that hides the button component:
    "type":"scs-button",
    "id":"scs-button",
    "hidden":true
    Similarly, the following is an example entry that hides the slider section layout:
    "type":"scs-sectionlayout",
    "id":"scs-sl-slider",
    "hidden":true

    The full entry into the components.json file to hide both the button component and slider section layout would be as follows:

    [
        {
            "name":"",
            "list":[
                {
                    "type":"scs-button",
                    "id":"scs-button",
                    "hidden":true
                },
                {
                    "type":"scs-sectionlayout",
                    "id":"scs-sl-slider",
                    "hidden":true
                }
            ]
        },
        {
            "name": "Starter",
            "list": [
                {
                    "type": "component",
                    "id": "StarterComponent",
                    "themed": true
                },
                {
                    "type": "component",
                    "id": "StarterFooter",
                    "themed": true
                }
            ]
        }
    ]
  7. Once you've made the desired changes, upload the components.json file to the theme as a new version.