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:
- In Oracle Content Management, click Developer in the left navigation menu.
- On the Developer page, click View all Themes.
- On the Themes page, select the theme to modify and click Open in the right-click menu or click in the actions bar.
- Select the components.json file and click Download.
- Open the components.json file in a text editor.
- Add objects to specify the component type and ID, and set the property
hidden
equal totrue
.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 } ] } ]
- Once you've made the desired changes, upload the components.json file to the theme as a new version.