Menu Close

Get Support From ShopWired Close

All Systems Are Operational

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available 9.00am to 7.00pm Monday to Friday
11.00am to 5.00pm Saturday
Quickest response time

Send A Message
Response within 24 hours

Menu Close

Menu

Category

The category object has the following attributes:

category.id

Returns the unique platform ID for the category.


category.title

Returns the title/name of the category.


category.url

Returns the relative URL of the category.

{{ category.url }}

returns...

/nike-airmax-trainers-in-white

category.photo_url

Returns the URL of the photo/image for the category.


category.photo_description

Returns the ALT text for the photo/image for the category.


category.description

Returns the description of the category. Use the raw filter so that the variable is not escaped.

If enabled, the {{ category.description2 }} variable will return the 2nd category description.


category.from_price

Returns the from price for the category (i.e. calculates the cheapest price for the product within the category and returns it).


category.current

Returns true if the category is the current category (this can be used in sidebar menus to highlight the selected category).


category.open

Returns true if the category is open in the category menu.


category.categories

Returns an array of the categories (subcategories) within the category.

{% for category in categories %}
    {{ category.title }}
{% endfor %}

returns...

Dresses
Coats
Shoes

Note: Only the category's immediate subcategories are returned in the array.