Issue with wcm/msm/components/ghost




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)




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)

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

Answers (0)