Component Policy
January 3, 2020 ยท View on GitHub
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:
- Title - the user friendly title for the Component Policy
- 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.

To add a new component configuration:
- Select the + button on the Component Configurations container
- Select the Component Type Sling CMS - Component Configuration
- Select Add Component
- Click the Pencil button on the new Component Configuration
- Select the component you want to configure from the Component dropdown, this will load the configuration fields for this component
