I am currently working on a one page website. I have customized the homepage template for that. This page has different sections. For one section it should display the time and dates of a band performance. I created a new template (PerformancePage.ss) for this and created a loop in the HomePage.ss.
<% loop $Children %>
<% include PerformancePage %>
<% end_loop %>
This works perfectly fine, but what it might occur that there are no performances. I thought I could do this by looking at the performance date. When $Performance_Date > Today it should display the performance, ELSE it should display a custom message.
I tried this on the PerformancePage.ss
<!-- Performance Starts -->
<% if $Performance_Name == "test1" && $Performance_Date > DateTodayValue %>
<div class="col-md-3 col-sm-6 single-pricing-wrap center animated" data-animation="bounceInLeft" data-animation-delay="500">
<h4 class="pricing-heading color-scheme">$Performance_Name</h4>
<h3> $Performance_Date </h3>
<li><span class="color-scheme fa fa-clock-o"></span>Tijd: $Performance_Start_Time - $Performance_End_Time uur</li>
<div class="sign-up"> <a href="$Performance_Link" target="_blank" class="fancy-button button-line btn-col zoom"> Koop tickets <span class="icon"> <i class="fa fa-ticket"></i> </span> </a> </div>
<% else %>
There are currently no performances
<% end_if %>
<!-- Performance Ends -->
I tested it by populating the $Performance_Name value with “test1” and it did not work. Ideally it should look at the $Performance_Date. But I don’t know how I can do this.
Can anyone help me with this?