Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Using layout on data-sly-resource'd components

Level 2
Level 2


I am using data-sly-resource to to add two responsive grid components within a wrapper for additional functionality.  The containers work great except you can't edit the layout of the container itself.  The cq:responsive nodes get saved in crx/de, but they are not displayed when the component renders. Was hoping someone could point me in the right direction here. I have two different containers because I was experimenting trying to get this to work.  


Component properties:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq=""
jcr:title="Animation Container"
componentGroup="Banner AEM Website 2021"

The render script is here: 

<sly data-sly-use.animationcontainer="com.banner.aem.components.content.animationcontainer.AnimationContainer" />

<div id="animation-container">
<div id="animation-hidden-container">
<sly data-sly-list.image="${animationcontainer.images}">
<img class="animation-img" id="animation-img-${imageList.count}" src="${image}">

<div id="animation-container-img">
<img id="animation-img-shown" src="${animationcontainer.firstImage}">

<div id="container1">
<div id="animation-trigger"></div>
<sly data-sly-resource="${'container1' @ resourceType='wcm/foundation/components/responsivegrid'}"></sly>

<div id="container2">
<sly data-sly-resource="${'container2' @ resourceType='banner/components/content/bannercontainer', cssClassName='bannercontainer', decorationTagName='div'}"></sly>

 In crx/de: 



But when you inspect it: 



I'm sure I'm missing something really easy here.  


2 Replies
Community Advisor
Community Advisor

Hi @blaris 

Could you please check if component specific CSS is impacting the display. In this case, check the CSS properties of "animation-container", "container1" and "container2"

Level 2
Level 2

The CSS is not being overwritten, those classes are just not being applied.  I would expect the responsivegrid to have the aem-Gridcolumn classes, based on the cq:responsive nodes.