I am using the products module to build a database of campsites that allow campfiers in the UK. You can see it here:
http://www.campfires-allowed.co.uk
I have a set of custom fields set up as check boxes which I want to use to show an icon on the products page if it is set to true.
The code below shows what I have done for this, but it isn't working quite right. Basically the code below shows the icon if there is ANY value in the checkbox - true or false.
How would I have it only display the icon when the value is 'true'?
Code: Select all
{if $entry->fields.CaravansAllowed->value}
<div class="icon">
<img src="uploads/images/iconCaravan.png" alt="Caravans Allowed" width="38" height="38" />
</div>
{/if}