コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.
解決済み

Ghost nodes in MSM

Avatar

Level 3

The ghost nodes that get created while cancelling inheritance have div wrapped and create unnecessary space on the page. How can this be handled , avoid the space from coming in the publisher without any code changes to the container etc. Do we have any hotfix or configurations to avoid the issues that ghost node causes?

トピック

トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

 

AEM creates a placeholder or "ghost" node for the component in the child page.

Did you try CSS style - apply display 'none' .

Generally these type will handle in CSS style classes. 

or need to create a custom component to handle this scenario - Create a custom component that doesn't output any markup when it doesn't have any content. You could then use this component as a wrapper for the components where you're cancelling inheritance.

or other way is post processing with sling filter

Implement a post-processing step that removes the empty divs from the HTML before it's sent to the browser. This could be done using a filter in the Sling processing pipeline.

元の投稿で解決策を見る

2 返信

Avatar

正解者
Community Advisor

 

AEM creates a placeholder or "ghost" node for the component in the child page.

Did you try CSS style - apply display 'none' .

Generally these type will handle in CSS style classes. 

or need to create a custom component to handle this scenario - Create a custom component that doesn't output any markup when it doesn't have any content. You could then use this component as a wrapper for the components where you're cancelling inheritance.

or other way is post processing with sling filter

Implement a post-processing step that removes the empty divs from the HTML before it's sent to the browser. This could be done using a filter in the Sling processing pipeline.

Avatar

Level 3

Thank you @SureshDhulipudi . I guess all the solutions would work and the fastest would be the CSS/JS. I can get all the elements with class-ghost and hide them on page load.