What is the problem you are trying to solve?
In the Page Editor it is possible to “hide” any fragment from display. This is primarily designed to allow different layouts to be defined for different devices, and it works by simply adding “display: none !important;” to the CSS for the fragment.
However, there is another use-case where a page builder may have a section of content that they want to show sometimes but not always. For example, on liferay.dev we have a banner which is currently promoting DevCon. There may not always be a need to show this banner, if there’s no event being promoted, and the “hide” function would seem to be a great way of allowing it to stay in the design, but not be shown to end-users.
However, because the fragment(s) are still rendered in the DOM, the content will be indexed by search engines and LLMs - which will not be the desired outcome.
Currently the only option is to delete these fragments entirely, and then re-add them when they are needed - which is a time consuming effort.
What is your project about? (e. g. Intranet, Partner Portal, Enterprise Website, etc)
Enterprise Website
What is your proposed solution? (optional)
The solution to this problem would be to provide a “Do not render” option for Fragments in addition to the existing “Hide” option. Instead of simply hiding using CSS, this option would keep the fragments in the design of the page, but strip them from the page rendered to users.