Forum

Thread tagged as: Question, Problem

Hiding post based on two criteria.

I am trying to hide posts based on the following criteria:

If the date is in the past, and if the "hide post after event" checkbox has been turned on.

I have successfully managed to filter the unwanted evens in my template using:

<perch:if id="dato" value="{current_date_and_time}" match="lte">
<perch:if id="hide_post" value="false" match="neq">
    This post should be hidden
</perch:if>
</perch:if>

However, I want to do the opposite. I have tried changing "lte" to "gte" and match "neq" to "eq", but it does not work. is there a perch unless-tag?

Erling Hoff

Erling Hoff 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you running the latest version? I would have thought that should work.

Otherwise, would the <perch:else /> clause help?