# Feature Request: Ability to Fully Exclude Hidden Fragments From Published HTML Output

**URL:** <https://discuss.liferay.com/t/feature-request-ability-to-fully-exclude-hidden-fragments-from-published-html-output/203>\
**Category:** Development\
**Tags:** cms, fragments\
**Created:** [December 6, 2025, 7:15am UTC](https://discuss.liferay.com/t/feature-request-ability-to-fully-exclude-hidden-fragments-from-published-html-output/203 "2025-12-06T07:15:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavel.sach-m](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@pavel.sach-m](https://discuss.liferay.com/u/pavel.sach-m)\
**Post date:** [December 6, 2025, 7:15am UTC](https://discuss.liferay.com/t/feature-request-ability-to-fully-exclude-hidden-fragments-from-published-html-output/203/1 "2025-12-06T07:15:20Z")

</div>

We would like to request a new feature (or enhancement to existing behaviour) that allows editors to hide fragments in the page editor in a way that removes them entirely from the published HTML output. Currently, hidden fragments remain in the DOM and are only visually suppressed through CSS. This creates several content-management, business, and SEO risks.

## **Current Behaviour**

When an editor hides a fragment in the page layout editor (using the eye icon), the fragment is no longer visible to end users. However, its HTML markup still appears in the rendered page. In other words, fragments marked as _hidden_ are still fully delivered to clients and crawlers, despite being visually suppressed.

## **Why This Is a Problem**

### **Search engine indexing of hidden content**

Hidden fragments remain visible to crawlers parsing raw HTML. Search engines may treat this as “hidden text,” which is considered a potentially manipulative SEO pattern and can lead to ranking penalties or de-indexing.

### **Unintentional exposure of draft, unpublished, or temporarily hidden content**

Editors may use the “hide fragment” option to temporarily remove specific content from the live page — for example while preparing updates, reviewing text, or replacing one business-specific message with another that will later be restored. Because hidden fragments remain in the HTML, such draft or business-sensitive information may unintentionally become publicly accessible and indexable, even though it is intended to be excluded from the published page for a limited time.

### **Mismatch between editor expectations and actual output**

Editors reasonably assume that “hidden” content is not part of the published page. The current implementation breaks this expectation, creating confusion and causing unpredictable SEO and content-governance outcomes.

### **Long-term SEO risks**

Repeated presence of hidden-but-indexable content may reduce search-engine trust, impacting long-term ranking stability and the overall SEO profile of the site.

## **Requested Enhancement**

We propose adding an option or new behaviour that allows hidden fragments to be fully excluded from the server-side HTML output. Specifically:

- When a fragment is marked as hidden in the editor, **it should not be included in the published DOM at all**.

- Alternatively, provide a configuration flag or property to switch between the current visual-only hiding and full HTML exclusion.

- Ideally, this behaviour should be supported for both fragments and nested content elements.

---

<div class="post-metadata">

**Author:** ![pavel.sach-m](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@pavel.sach-m](https://discuss.liferay.com/u/pavel.sach-m)\
**Post date:** [July 22, 2026, 2:00pm UTC](https://discuss.liferay.com/t/feature-request-ability-to-fully-exclude-hidden-fragments-from-published-html-output/203/2 "2026-07-22T14:00:51Z")

</div>

@Luiz_Jardim

The scenario is not related to draft content versions. The concern is about already published pages where editors use the fragment visibility option to temporarily hide specific sections of the page while keeping them configured in the layout for future reuse.

In this case, the fragment itself is part of the published page layout, but it is only visually hidden. Therefore, its HTML is still delivered to the client even though the editor expects the section to be temporarily removed from the public page.

---

<div class="post-metadata">

**Author:** ![pavel.sach-m](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@pavel.sach-m](https://discuss.liferay.com/u/pavel.sach-m)\
**Post date:** [July 22, 2026, 2:00pm UTC](https://discuss.liferay.com/t/feature-request-ability-to-fully-exclude-hidden-fragments-from-published-html-output/203/3 "2026-07-22T14:00:59Z")

</div>

@Priyank_Gajera  
The purpose is to support the normal content management workflow. Business users often need to prepare multiple sections of content and repeatedly decide which ones should be visible on the live page at a given time.

For example, a business team may publish one section during a specific campaign period and hide it afterwards, while keeping the prepared layout structure available for future reuse. In such cases, editors naturally expect hidden fragments to be excluded from the published page output until they are made visible again.
