Hi all,
Need help to get rid of the auto generated extra div wrapper around the components ? But this should be publisher mode only. Author mode need to be have that because of the editing panel.
Note that im using HTL (Not JSP) and i cannot edit global.js because i need that extra div wrapper on some component as well.
im using AEM 6.2 .
Kindly help on this matter.
Thanks.
Solved! Go to Solution.
you can do data-sly-unwrap="${wcmmode.disabled}" then the div is removed is non edit mode.
so
<div ... data-sly-unwrap="${wcmmode.disabled}" ></div>
Try this:-
<sly data-sly-resource="${'foo' @ decorationTagName=(wcmmode.<Mode>? '':'div') , resourceType='my/resource/type}"/>
Feike Visser What do you think here?
~kauutk
Views
Replies
Total Likes
Have you tried below property
You can apply this to specific components for which you dont want wraper divs. For more info visit Decoration Tag
Views
Replies
Total Likes
you can do data-sly-unwrap="${wcmmode.disabled}" then the div is removed is non edit mode.
so
<div ... data-sly-unwrap="${wcmmode.disabled}" ></div>
you can use cq:htmlTag node in your component to generate your custom div with custom class.
cq:tagName : Here you can define the div or section or whatever tag you need.
I observed that if we don't provide cq:tagName the extra div itself is not getting generated (tested in 6.1 SP2)
So may be you can use this way.
Could you please post an example for this one.
can anybody provide solution for jsp component
Views
Replies
Total Likes
create cq:htmlTag node as nt:unstructured,
create property cq:tagName and leave it blank.
This seems perfect solution for removing default wrapper from a component.
This node can be used to set any class and to change the wrapper element.
Views
Likes
Replies