Expand my Community achievements bar.

Resources called via data-sly-resource are not visible in publish mode.


Level 2

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>


kiran_22_12_0-1670833392991.png      Publish mode doesn't show any button.

Author Mode


Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies



hi @kiran_22_12 ,


There is no syntax issue, So, by right button should come. I feel issue is

1) your model is not present or bundle not active in publisher 


2) Your content is not there.


Can you try printing the values directly such as 




Hope this helps.



Nikita Garg


Level 2

Hi nikita,

My model is present & the content is there as well. I have tried these. They work individually.

But I just solved it using the below code:

<sly data-sly-test="${contentBlockModel.includeButtons}"  data-sly-list="${contentBlockModel.ButtonComponentsList}">
<sly data-sly-resource="${'button{0}' @ format=itemList.count , resourceType='kiran/components/content/button', decorationTagName='div'}"></sly>
page footer