container component allowed components

Avatar

Avatar
Validate 1
Level 2
sreedobe
Level 2

Likes

4 likes

Total Posts

67 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 2
sreedobe
Level 2

Likes

4 likes

Total Posts

67 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
sreedobe
Level 2

21-12-2020

article-body-component.png

 

component htl .

<div itemprop="articleBody">
    <div data-sly-resource="${'container' @ resourceType='wcm/foundation/components/responsivegrid'}"></div>
</div>
<div data-sly-test="${(wcmmode.edit || wcmmode.preview)}"
     class="cq-placeholder ${classAppend}"
     data-emptytext="${component.properties.jcr:title}${emptyTextAppend && ' - '}${emptyTextAppend}">
</div>

 

When I put "articleBody" container component on template structure. I do not see 'allowed components' similar to other responsivegrid containers ( in above picture)

 

when I checked container responsivegrid policy - it is mapped to proper policy and needed component groups are checked in policy.

 

layout-container-policy.pngweb-layout-container-policy.png

 

Any help?

 

Thanks,

Sri

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Boost 250
MVP
shelly-goel
MVP

Likes

250 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
Ignite 3
Give Back 10
View profile

Avatar
Boost 250
MVP
shelly-goel
MVP

Likes

250 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
Ignite 3
Give Back 10
View profile
shelly-goel
MVP

21-12-2020

@sreedobe 

You would not see all the components added in the embedded responsivegrid on the UI because your component's script is getting executed. If you add the sling:resourceSuperType on your component to 'wcm/foundation/components/responsivegrid' and remove <component-name>.html then you would see it showing all the allowed components on the UI.

If I understand correctly, you've created a custom component to add a enclosing <div itemprop='articlebody'>. To achieve this, you can leverage 'Style System' to add an enclosing div class on this grid and then using javascript add those relevant custom attributes like 'itemprop'.