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?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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.
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.
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.
Views
Likes
Replies