Apache Sling > Sling CMS > Administration > Component Policy

Component Policy

Component policies control what components can be placed within containers and the configurations for the components. They should be referenced from page templates.

Creating a Component Policy

Component policies should be created at the path /conf/[config_name]/site/policies with the Configuration Type “Sling CMS - Component Policies”

Once the configuration is created, policies can be added by clicking + in the container and adding a “Sling CMS - Component Policy” component.

Configuring a Component policy

Select the top pencil to configure the Component Policy. Component Policies have the following fields:

  1. Title - the user friendly title for the Component Policy
  2. Available Component Types - The component types which will be available in containers using this component policy

Component Configurations

Component configurations are used to share configurations values with all of the pages using the template.

Component Configurations

To add a new component configuration:

  1. Select the + button on the Component Configurations container
  2. Select the Component Type Sling CMS - Component Configuration
  3. Select Add Component
  4. Click the Pencil button on the new Component Configuration
  5. Select the component you want to configure from the Component dropdown, this will load the configuration fields for this component

Selecting the Component Type