Category Variables


Variable Usage
category.api_code Returns the api_code for the category.
{{ category.api_code }}<br>
category.children Returns a collection child categories associated with the category.
{{ category.children }}<br>
category.description Returns the long description for the category.
<p>{{ category.description|unescape }}</p><br><br>
category.images Returns a collection of images associated with the category.
{% for image in category.images %}    <img src="{{ image.thumbnail(400, 200) }}"/> {% endfor %}<br>
category.images.first.thumbnail() Returns a the first image associated with the category. Allows for the setting of image dimensions via .thumbnail(width,height). A default image can also be set in the event if no image has been uploaded for the product.
<img src="{{ category.images.first.thumbnail(800, 'auto')|default('http://placehold.it/460x300') }}"/><br>
category.meta_description Returns the SEO meta description for the category.
{{ category.meta_description}}<br><br>
category.meta_keywords Returns the SEO meta keywords for the category.
{{ category.meta_keywords}}<br>
category.name Returns the name for the category.
{% if category.name == 'Sporting goods' %}   NAME:{{ category.name }}{% endif %}<br>
category.url_name Returns the URL name for the category.
<a href="/category/{{ category.url_name }}">    {{ category.name }}</a><br><br>
category.parent Returns a collection of parent categories associated with the category.
<p>{{ category.parent.name}}/{{ category.name}}</p><br>
category.productList Returns a collection of products associated with the category.
{{ category.productList }}<br>
category.products_count Returns the number of products in the category.
{{ category.products_count }}<br>
category.products.count Returns the total number of enabled and in-stock products in the category.
{{ category.products.count }}
category.short_description Returns the short description for the category.
<p>{{ category.short_description|unescape }}</p><br>
category.products.count Returns the total number of enabled and in-stock products in the category.
{{ category.products.count }}