Hey,
So I’m having a trouble here with a switch statement. First of all, my goal (in case there’s an easier way that avoids all this) is to filter entries by a Date field. As the “search” parameter can’t do comparisons, instead I used some input php and an “if” statement to filter through them and only display the ones that fall within the date range.
{if listing_dob < <?php echo $min_dob; ?> AND listing_dob > <?php echo $max_dob; ?>}
<a href="http://{permalink=%27adoption_listings/index%27}" class="listing_thumb">_ {listing_image:thumbnail}_ <span class="listing_thumb_name">{listing_first_name}</span>_ </a>
{switch='||</div><div class="row-fluid">'}
{/if}
{if count == total_results}
</div>
{/if}Which works fine except that the switch statement seems to always fire, not just when the if statement is satisfied. Any ideas as to why this is?