Add new "Do not render" option to ensure that fragments can be totally hidden from search engines and LLMs

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.

Yes indeed. This is a real confusion for an editor to realized that the ‘hide’ feature of the page editor is really just putting a css mask on the markup instead of actually removing the markup from the DOM. I understand the intent of the hide is probably connected to showing / hiding fragments across breakpoints, but that context isn’t really clarified as a display only vs underlying markup.

There is another concept of the searchability flag. All three of these display visibility rules are loosely connected.

I know this isn’t really a ‘solution’ per se, but if there is some solutioning to be done, this connection might be important to keep in mind.