Use Case 1 : We usually bind the components with Component group to help authors while authoring the page. But once components are dragged dropped on the page , its difficult to track them back to which component group it belongs (apart from getting the resourcetype and then check).
Use Case 2 : sometimes we need certain properties should be set by default when component is dragged dropped on the page .
AEM provides OOTB feature :
- Lets assume your component is located at "/apps/mysample/components/test"
- Add the node "cq:template" of type "nt:unstructured" to the component.
- Add <propertyname> and its <value> to the "cq:template" node.
- Now wheresoever this component will be placed (on any page) , following properties (set in step 2) will be part of the component by default and we can get from them from page properties.
No comments:
Post a Comment