Forum
Setting and maths on variables in a template?
I want to be able to check if certain fields exist on page and create and add to a variable for making some later decisions further down the code in a template. For example ...
<perch:if exists="productLargeImage1" OR "productLargeImage2" OR "productLargeImage3">
(set some variable to 1)
</perch:if>
<perch:if exists="productLargeImage1" AND "productLargeImage2" AND "productLargeImage3">
(set some variable to 3)
</perch:if>
Or set the variable initially to zero and increment or decrease it as I check specific fields have values in them. I can't see such a facility or variable. Please point me to one if there's something I've not spotted in the documentation.
Thanks, Graham
Nope, we don't have that.