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
BedrockMission!

Learn More

View all

Sign in to view all badges

Issue with wcm/msm/components/ghost

Avatar

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

224 likes

Total Posts

283 posts

Correct Reply

65 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

224 likes

Total Posts

283 posts

Correct Reply

65 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile
Shashi_Mulugu
MVP

20-07-2020

Hello Team,

 

I read through all other community posts and internet before coming.

 

I have an MSM with master pages setup. While i have created live copy pages and deleted the one of the child item in a container by breaking the inheritance, i am getting my current component converted to "wcm/msm/components/ghost". That is fine as it will help us in re-enabling the inheritance but due that it is causing problem in Publisher as well since it is getting extra <div class="ghost <my-comp-name>"></div> since by default all childs under the layout container are getting pulled..

 

<div class="ghost <my-comp-name>"></div>

 

<sly data-sly-use.container="com.adobe.cq.wcm.core.components.models.LayoutContainer" data-sly-repeat="${container.items}" data-sly-resource="${item.path @ decoration=true, cssClassName='my-comp-name'}"></sly>

 

@kautuk_sahni Please help

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

505 likes

Total Posts

641 posts

Correct Reply

213 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

505 likes

Total Posts

641 posts

Correct Reply

213 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

20-07-2020

Hi @Shashi_Mulugu,

As you said, MSM ghost node is needed in author for re-enabling inheritance in future. 

In publish, as you are listing the resource items from LayoutContainer, you can write a custom implementation of LayoutContainer using below actual implementation as sample. (mapping it to your component resourceType in @Model annotation)

https://github.com/adobe/aem-core-wcm-components/blob/master/bundles/core/src/main/java/com/adobe/cq...

In readItems() method, return the resource list except the ghost resource on conditional basis. 

Answers (0)