Hi everybody,
Example: the html template of the cq component
<div class="another-tag my-dynamic-class-chosen-via-a-cq-dialog">
component body
</div>
We already tried to override the parsys, but this is a real pain another solution I have thought about is writing a sling component filter.
Do you have any other idea?
Thank you!
Solved! Go to Solution.
For the ones who could be stuck on this issue I solved it by implemeting a SlingFilter with COMPONENT scope as described here:
http://stackoverflow.com/questions/26102239/aem-cq-conditional-css-class-on-decoration-tag
One thing to be aware of is to correctly rank our Decorator filter in the order list. It should come after
com.day.cq.wcm.core.impl.WCMComponentFilter
otherwise the custom class id added in the wrong place.
Correct rank order is -100 in AEM 6 SP2.
Views
Replies
Total Likes
Can you check this article for the cq:htmlTag?
http://dev.day.com/cemblog/en/experiencedelivers/2013/04/modify_the_auto-generateddivs.html
Views
Replies
Total Likes
For the ones who could be stuck on this issue I solved it by implemeting a SlingFilter with COMPONENT scope as described here:
http://stackoverflow.com/questions/26102239/aem-cq-conditional-css-class-on-decoration-tag
One thing to be aware of is to correctly rank our Decorator filter in the order list. It should come after
com.day.cq.wcm.core.impl.WCMComponentFilter
otherwise the custom class id added in the wrong place.
Correct rank order is -100 in AEM 6 SP2.
You can find out in your filter if the component is included as part of the page by checking javax.servlet.include.servlet_path in request attribute. If request.getAttribute("javax.servlet.include.servlet_path") is not null then, you got your compoennt. Adapt the resource, get the property and you can decorate the way you want.
Views
Replies
Total Likes
Views
Likes
Replies