Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
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!
Gelöst! Gehe zu Lösung.
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.
Zugriffe
Antworten
Likes gesamt
Can you check this article for the cq:htmlTag?
http://dev.day.com/cemblog/en/experiencedelivers/2013/04/modify_the_auto-generateddivs.html
Zugriffe
Antworten
Likes gesamt
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.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten