JordanH
Well-known member
I'm trying to display multiple categories of an addon.
In the database it shows like this:
https://snap.me/SW3Z8f
Some of them have 1 category, some of them have multiple.
How can I show if a "product" is in a category in a template?
If I were to do something like this:
etc, etc for every category with it's respective id and name. Only the first category in the database would show for the product, not multiple if the product had multiple categories.
In the database it shows like this:
https://snap.me/SW3Z8f
Some of them have 1 category, some of them have multiple.
How can I show if a "product" is in a category in a template?
If I were to do something like this:
HTML:
<xen:if is="{$product.category_ids} == 7">
<a href="#">Indie</a>,
</xen:if>
<xen:if is="{$product.category_ids} == 5">
<a href="#">Adventure</a>,
</xen:if>
<xen:if is="{$product.category_ids} == 4">
<a href="#">Action</a>,
</xen:if>