Hi,
We are using sightly. When I drag a component to a parsys, It is appending some div tags to it. For example, it is appending the following the following div tag to my navigation component:
<div class="topnav section">
</div>
I've already used data-sly-unwrap and I don't know why it is appending that tag. Could anybody help to solve this issue?
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
leeasling wrote...
Oh sorry. I think in Sightly it's actually broken. If you go to /libs/wcm/foundation/components/parsys and replace
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName='div'}" />
with
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName=''}" />
You'll see that even with no decoration, the <div> tag still renders. Now, if you replace it with
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName='span'}" />
You'll see that the wrappers are now rendering a <span> rather than a <div>. So it looks like it's just not possible to do this in Sightly and whether that is intentional or a bug, I have no idea.
Perfect. Worked for me. Thanks a lot.
Views
Replies
Total Likes
this <div> with class should be included in some other html
Views
Replies
Total Likes
Views
Replies
Total Likes
bsloki wrote...
this <div> with class should be included in some other html
We did not include anywhere and we did not this class name in our CSS. We've been trying hard to find why we see this problem.
Views
Replies
Total Likes
leeasling wrote...
See this post:
Thanks for your reply. This url is related to make changes in global.jsp but we are not using global.jsp in our components developed by sightly.
Views
Replies
Total Likes
Oh sorry. I think in Sightly it's actually broken. If you go to /libs/wcm/foundation/components/parsys and replace
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName='div'}" />
with
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName=''}" />
You'll see that even with no decoration, the <div> tag still renders. Now, if you replace it with
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName='span'}" />
You'll see that the wrappers are now rendering a <span> rather than a <div>. So it looks like it's just not possible to do this in Sightly and whether that is intentional or a bug, I have no idea.
Views
Replies
Total Likes
leeasling wrote...
Oh sorry. I think in Sightly it's actually broken. If you go to /libs/wcm/foundation/components/parsys and replace
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName='div'}" />
with
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName=''}" />
You'll see that even with no decoration, the <div> tag still renders. Now, if you replace it with
<sly data-sly-test="${!paragraph.columns && paragraph.resourceType && !paragraph.cssClasses}" data-sly-resource="${paragraph.resourcePath @ resourceType=paragraph.resourceType, decorationTagName='span'}" />
You'll see that the wrappers are now rendering a <span> rather than a <div>. So it looks like it's just not possible to do this in Sightly and whether that is intentional or a bug, I have no idea.
Perfect. Worked for me. Thanks a lot.
Views
Replies
Total Likes