Solved
Resources called via data-sly-resource are not visible in publish mode.
Hi Community,
I have been trying to call the button resource in my sightly, based on Count authored in dialog. The below code works fine in author mode, but in publish mode. I cannot see the buttons that I authored.
<sly data-sly-test="${contentBlockModel.includeButtons}" data-sly-list="${contentBlockModel.ButtonComponentsList}">
<sly data-sly-test.resourceNode="${['button', item] @join='-'}">
<sly data-sly-resource="${ @path=resourceNode,
resourceType='kiran-base/components/content/button', decorationTagName='div'}"></sly>
</sly>
</sly>
Publish mode doesn't show any button.
Author Mode