Hello,
I'm calling in region information from another page and filtering the results. However when no results are returned the <perch:before> and <perch:after> sections are still being shown.
The filters work fine and only show the information associated with the current page - however when there isn't any information associated it still returns the before and after code.
Code
The template is as follows:
Code
- <perch:before>
- <div class="courseList section">
- <div class="wrapper">
- <h4><perch:content id="pageTitle"/> Courses & Workshops</h4>
- <p><a href="/courses-workshops" title="View all courses...">View all courses...</a></p>
- <ul>
- </perch:before>
- <perch:if id="today" match="lte" value="{date}">
- <li>
- <a href="/course-details?course=<perch:content id="_id" />" title="">
- <h4><perch:content id="courseTitle" type="text" html="true"/></h4>
- <p class="date"><perch:content id="date" format="l jS F H:i" /></p>
- <p><perch:content id="courseSubject" /></p>
- <p><perch:content id="courseSubject" type="pagelist" output="pageTitle" /></p>
- <p><perch:content id="_id" /></p>
- </a>
- </li>
- </perch:if>
- <perch:after>
- </ul>
- </div><!--/.wrapper-->
- </div><!--/.courseList section-->
- </perch:after>