Associate Components with Themes

You can associate components, section layouts, and component groups with a theme to use a specific subset of components with the theme.

As a developer, you can create a theme and components for a template that marketers will use to create sites that promote your organization's products. By associating a component with a theme, you make it available when the user selects Theme Components in Site Builder. On the Theme Components tab, the user will see only the components you associated with the theme. Associating a component with a theme ensures that this component will be exported with the site template, even if it is not used on the site.

To associate a component with a theme:

  1. In Oracle Content and Experience, click Developer in the left navigation menu.

  2. On the Developer page, click View All Themes.


    Description of developer-page.png follows
    Description of the illustration developer-page.png

  3. On the Themes page, select a theme.

  4. Click Properties in the top menu to open the Theme dialog.

  5. Click Theme Components on the left to open the Theme Components tab.

  6. Select one or more components to associate with the theme and categorize the components:

    1. From the Select a component drop-down list, choose a custom component.

    2. For the first component you choose, enter the name of a category to create a category for the component.

    3. For each additional component you choose, select an existing category or create a new category.

    4. Click Add Component.


    Description of template-theme.png follows
    Description of the illustration template-theme.png

  7. Click Save to associate the components you selected with the theme.

  8. On the Themes page, select a theme and click Properties to open the Theme Components tab again.

  9. Verify that the components you selected were saved.

    To remove an associated component from the theme, click X next to the component name on the Theme Components tab, and then click Yes in the Remove Component dialog.

You can see a list of components associated with the theme that a template is using on the Details page for the template. The references to the components associated with the theme are stored in the components.json file for the theme.


Description of components-json.png follows
Description of the illustration components-json.png

After configuring the theme association, you can deploy a template to Oracle Content and Experience and share it with the marketing team. When marketers choose that theme for their site, they’ll see only the components you specified for the theme on the Theme Components tab in Site Builder. The lists of Custom and All components also include the associated themed components.

Associate a Component with a Theme in OCE Toolkit.

To associate a component with a theme in OCE Toolkit, you can use the following cec command. The component will appear on the Theme Components tab in Site Builder, as well as in lists of Custom and All components.

cec add-component-to-theme <component>

The following cec command removes the association of a component from a theme.

cec remove-component-from-theme <component>

For information about OCE Toolkit, see Develop with OCE Toolkit.