Build Your Course The Easy Way
Get Started Free

category

The liquid object `category` returns information about your current Category.

In this article:


The category object has the following attributes:

    category.id

    Returns the unique id for the current Category.

    <p>This Category's id is '{{ category.id }}'</p>

    category.title

    Returns the Title for the current Category.

    <h1>{{ category.title }}</h1>

    category.description

    Returns the Description for the current Category.

    <p>{{ product.description }}</p>

    category.posterimageurl

    Returns the URL for the Poster Image for the current Category.

    <img src="{{ category.poster_image_url }}">

    category.created_at

    Returns the timestamp for when the Category was created.

    <p>{{ category.created_at }}</p>

    category.updated_at

    Returns the timestamp for when the Category was updated.

    <p>{{ product.updated_at }}</p>

    category.children?

    Returns a boolean for whether or not there are subcategories nested in the current Category.

    {{ category.children }}

    category.subcategories

    Returns an array of all Subcategories within the current Category.

    {% for category in category.subcategories %} <h1>{{ category.title %}</h1> {% endif %}

    category.nested?

    Returns a boolean for whether or not the current Category is nested within another Category.

    {{ category.nested? }}

    category.parent_category

    Returns the Parent Category for the current Category (can only be called within a subcategory).

    {% if category.nested? %} <a href="{{ category.parent_category.url }}">Back to Parent Category</a> {% endif %}

    category.product

    This calls the parent Product of the current Category, allowing you to call any of the drops associated with product. Click here to view the drops available for product.

    <p>{{ category.product.title }}</p>

    Contact support or access our 24/7 Live Chat:

    Contact Support Live Chat

    Need Help? Live Chat with Us.