Forum
perch if: display category if eq "New"
In Perch Shop - products list template, I want to display category of the product, only when it match cat with id 34
So, my <perch:showall /> shows
category
Array
(
[0] => 32
[1] => 31
[2] => 37
[3] => 34
)
I try to use in the template
<perch:if id="category" match="eq" value="34">NEW!</perch:if>
But it doesnt seem to work. Can someone suggest me any solution for this?
Thanks!
Can you post your diagnostics report?
The first thing to do is make sure your problem still exists in the current version of the software.
Updated. But unfortunately this still exists in current version.
Using this on my home page
list-home-page.html
I don't think you'll be able to do it in the template, then. You'll need to use an
each
callback, look at the categories, and then set a value to check for/display in the template.