I have several components that are "span" type components. When a author drags them onto a page, the system creates a "div" around those components making them "block".
Is there any way to prevent AEM from automatically creating the surrounding DIV. It is extra markup that is not needed.
The component is built using Sightly and Java Use.
This is using AEM 6.1 and the Touch UI. I am not able to use "data-sly-unwrap" as the div is not part of the sightly, yet I don't want it to render.
Expected Code
<a href="#" class="class-name">Label of Button</a>
Output Code
<div class="name-of-component"> <a href="#" class="class-name">Label of Button</a> </div>
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
The HTML file does not have the DIV. Any component a Author places on a page, they generate a div surrounding it. I just want to prevent that.
I can do the CSS you showed, but I am trying to reduce page weight by not having too, and not having the extra DIV. This is my fallback plan. I would rather tell the component not to render the outer div.
Views
Replies
Total Likes
Hi.
So your dropping these components into a parsys? Is it broken just in the author experience and not when the page renders with wcmmode disabled? (disabled wcmmode via the param, for exampled.. if your working on http://host:4502/cf#/content/myProject/en.html go to http://host:4502/content/myProject/en.html?wcmmode=disabled
Views
Replies
Total Likes
The HTML file does not have the DIV. Any component a Author places on a page, they generate a div surrounding it. I just want to prevent that.
I can do the CSS you showed, but I am trying to reduce page weight by not having too, and not having the extra DIV. This is my fallback plan. I would rather tell the component not to render the outer div.
Views
Replies
Total Likes
I wonder if it has something to do with the xtype that is being rendered.
What kind of xtype is being used in the dialog?
While I am working on some dialogs I noticed that many of the different xtypes have a 'CLS' configuration. That might be set which is causing the component to render like that.
https://docs.adobe.com/docs/en/cq/5-6/widgets-api/index.html?class=CQ.html5.form.SmartImage (look at the CLS configuration).
Views
Replies
Total Likes