Forum

Thread tagged as: Question

Hide items in Perch, to not be displayed on the website

Hi,

I was wondering if there is any simple way to hide Content Regions in Perch so that individual items, i.e. repeated sections still exist in the database; but they are not shown in HTML.

Hoping this is possible

Garth Holmes

Garth Holmes 0 points

  • 3 years ago

I don't know what your template looks like but...

It's possible to add a checkbox field ("Show On Site") to an item template. When checked, this has a value. Then, filter on that value using perch_content_custom to output the items you want to display on the site.

Update: Or use conditional tags like <perch:if></perch:if>?

Many ways to achieve this. Could do like Clive suggested. Link: https://docs.grabaperch.com/perch/content/templates/allow-editors-to-select-which-regions-to-show/

Other options could be:
1. split in-template from out-template, and only use the content fields you want outputted as html in the out-template
2. have both in the same template, but add suppress=true to the parts you don't want shown. https://docs.grabaperch.com/templates/attributes/suppress/