Skip to content

getCategory(int category_id)

The getCategory method is used to get a Category object that represents category in the storefront.

Input parameters

category_id

int Numeric identifier of the category.

Returned value

The Category object or NULL if category does not exist or is inactive.

Example

source
{% set category = ObjectApi.getCategory(category_id) %}
{{ category.name }}
output
Example category