Category template
Category information, child categories, filters and product listing.
Output: page body inside the storefront layout.
Shared structures available in recorded contexts: shop, branding, theme, urls, page, navigation, breadcrumbs, languageSwitcher, currencySwitcher, headerActionContributions, labels, security, footer, cartPreview, accountHeader.
| Field | Type | Meaning | Availability |
|---|---|---|---|
viewModel.catalog |
object | Catalog data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.breadcrumbs |
array | Prepared breadcrumbs collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.catalog.breadcrumbs[].isCurrent |
boolean | Whether current applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.breadcrumbs[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.breadcrumbs[].url |
string | Prepared url URL; use unchanged. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.category |
object | Category data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.category.bannerImage |
object | Banner image data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.category.bannerMediaAssetId |
number | banner media asset identifier; do not load data with it. | When the parent is provided; check optional fields. |
viewModel.catalog.category.categoryId |
number | category identifier; do not load data with it. | When the parent is provided; check optional fields. |
viewModel.catalog.category.childCategoryDisplayVariant |
string | Child category display variant value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.category.customFieldGroups |
array | Prepared custom field groups collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.catalog.category.customFields |
array | Prepared custom fields collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.catalog.category.defaultSortKey |
string | Default sort key value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.category.description |
string | Description value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.category.hasBannerImage |
boolean | Whether banner image applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.category.hasDescription |
boolean | Whether description applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.category.hasiconimage |
boolean | Whether hasiconimage applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.category.hasproductcountlabel |
boolean | Whether hasproductcountlabel applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.category.iconimage |
object | Iconimage data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.category.iconMediaAssetId |
number | icon media asset identifier; do not load data with it. | When the parent is provided; check optional fields. |
viewModel.catalog.category.name |
string | Name value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.category.productCount |
number | Product count numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.category.productcountlabel |
string | Productcountlabel value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.category.storefrontDisplayMode |
string | Storefront display mode value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.category.url |
string | Prepared url URL; use unchanged. | When the parent is provided; check optional fields. |
viewModel.catalog.display |
object | Display data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.display.childCategoryDisplayVariant |
string | Child category display variant value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.display.fragment |
object | Fragment data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.display.fragment.hasNext |
boolean | Whether next applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.display.fragment.hasNextValue |
string | Has next value value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.display.fragment.nextUrl |
string | Prepared next URL; use unchanged. | When the parent is provided; check optional fields. |
viewModel.catalog.display.fragment.resultCountLabel |
string | Prepared result count display text. | When the parent is provided; check optional fields. |
viewModel.catalog.display.isEmpty |
boolean | Whether empty applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.display.labels |
object | Labels data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.display.labels.empty |
string | Translated empty text. | When the parent is provided; check optional fields. |
viewModel.catalog.display.labels.filterError |
string | Translated filter error text. | When the parent is provided; check optional fields. |
viewModel.catalog.display.labels.loadError |
string | Translated load error text. | When the parent is provided; check optional fields. |
viewModel.catalog.display.labels.loading |
string | Translated loading text. | When the parent is provided; check optional fields. |
viewModel.catalog.display.labels.loadMore |
string | Translated load more text. | When the parent is provided; check optional fields. |
viewModel.catalog.display.showLoadMore |
boolean | Whether load more applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.display.showProducts |
boolean | Whether products applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.display.showSubcategories |
boolean | Whether subcategories applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.display.subcategoriesTitle |
string | Subcategories title value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.filters |
object | Filters data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.activeItems |
array | Prepared active items collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.activeLabel |
string | Prepared active display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.applyLabel |
string | Prepared apply display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.clearLabel |
string | Prepared clear display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.clearUrl |
string | Prepared clear URL; use unchanged. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.closeLabel |
string | Prepared close display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.groups |
array | Prepared groups collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.groups[].hasActive |
boolean | Whether active applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].key |
string | Key value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].labelKey |
string | Label key value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options |
array | Prepared options collection; may be empty. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].count |
number | Count numeric value. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].countLabel |
string | Prepared count display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].isActive |
boolean | Whether active applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].isDisabled |
boolean | Whether disabled applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].key |
string | Key value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].url |
string | Prepared url URL; use unchanged. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].options[].value |
number | Value numeric value. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range |
object | Range data; check child fields before use. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.currencyDecimalPlaces |
number | Currency decimal places numeric value. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.currencyIsoCode |
string | Currency iso code value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.fromLabel |
string | Prepared from display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.localeCode |
string | Locale code value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.maxLabel |
string | Prepared max display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.maxValue |
string | Max value value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.minLabel |
string | Prepared min display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.minValue |
string | Min value value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.selectedMaxLabel |
string | Prepared selected max display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.selectedMaxValue |
string | Selected max value value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.selectedMinLabel |
string | Prepared selected min display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.selectedMinValue |
string | Selected min value value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.step |
string | Step value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.toLabel |
string | Prepared to display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].range.unitSymbol |
string | Unit symbol value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.groups[].style |
string | Style value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.filters.hasActiveFilters |
boolean | Whether active filters applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.hasGroups |
boolean | Whether groups applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.isfullmode |
boolean | Whether isfullmode applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.isquickmode |
boolean | Whether isquickmode applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.itemsUrl |
string | Prepared items URL; use unchanged. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.mobileButtonLabel |
string | Prepared mobile button display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.mode |
string | Mode value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.params |
object | Params data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.params.catalog_currency_id |
number | Catalog currency id numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.params.catalog_price_list_id |
number | Catalog price list id numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.resultCountLabel |
string | Prepared result count display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.showActiveFilters |
boolean | Whether active filters applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.showForm |
boolean | Whether form applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.showMobileFilterButton |
boolean | Whether mobile filter button applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.showProductsLabel |
string | Prepared show products display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.showQuickFilters |
boolean | Whether quick filters applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.showSummary |
boolean | Whether summary applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.sortKey |
string | Sort key value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.submitUrl |
string | Prepared submit URL; use unchanged. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.titleLabel |
string | Prepared title display text. | When the parent is provided; check optional fields. |
viewModel.catalog.filters.useSidebar |
boolean | Whether use sidebar applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.items |
array | Prepared items collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.catalog.items[].badges |
array | Prepared badges collection; may be empty. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].badges[].color |
string | Color value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].badges[].key |
string | Key value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].badges[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].comparePriceLabel |
string | Prepared compare price display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].hasImage |
boolean | Whether image applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].image |
object | Image data; check child fields before use. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].isDiscounted |
boolean | Whether discounted applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].manufacturerId |
number | manufacturer identifier; do not load data with it. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].manufacturerName |
string | Manufacturer name value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].name |
string | Name value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].priceLabel |
string | Prepared price display text. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].primaryImageMediaAssetId |
number | primary image media asset identifier; do not load data with it. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].productId |
number | product identifier; do not load data with it. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].shortDescription |
string | Short description value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].sku |
string | Sku value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].tagline |
string | Tagline value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].url |
string | Prepared url URL; use unchanged. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview |
object | Variant preview data; check child fields before use. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups |
array | Prepared groups collection; may be empty. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].items |
array | Prepared items collection; may be empty. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].items[].color |
string | Color value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].items[].image |
object | Image data; check child fields before use. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].items[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].items[].type |
string | Type value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].items[].url |
string | Prepared url URL; use unchanged. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].items[].value |
string | Value value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].remainingCount |
number | Remaining count numeric value. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].type |
string | Type value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.groups[].variantGroupId |
number | variant group identifier; do not load data with it. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.hasVariants |
boolean | Whether variants applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.items |
array | Prepared items collection; may be empty. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.items[].color |
string | Color value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.items[].image |
object | Image data; check child fields before use. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.items[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.items[].type |
string | Type value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.items[].url |
string | Prepared url URL; use unchanged. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.items[].value |
string | Value value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.items[].variantPreview.remainingCount |
number | Remaining count numeric value. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.pagination |
object | Pagination data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.pagination.hasNext |
boolean | Whether next applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.pagination.nextPage |
number | Next page numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.pagination.nextUrl |
string | Prepared next URL; use unchanged. | When the parent is provided; check optional fields. |
viewModel.catalog.pagination.page |
number | Page numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.pagination.perPage |
number | Per page numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.pagination.totalItems |
number | Total items numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.pagination.totalPages |
number | Total pages numeric value. | When the parent is provided; check optional fields. |
viewModel.catalog.sorting |
object | Sorting data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.catalog.sorting.currentKey |
string | Current key value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.sorting.currentLabel |
string | Prepared current display text. | When the parent is provided; check optional fields. |
viewModel.catalog.sorting.hasOptions |
boolean | Whether options applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.catalog.sorting.label |
string | Label value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.catalog.sorting.options |
array | Prepared options collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.catalog.sorting.options[].isActive |
boolean | Whether active applies; use for display only. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.sorting.options[].key |
string | Key value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.sorting.options[].label |
string | Label value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.sorting.options[].labelKey |
string | Label key value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.sorting.options[].url |
string | Prepared url URL; use unchanged. | For each existing item; optional child fields depend on item type. |
viewModel.catalog.subcategories |
array | Prepared subcategories collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.search |
object | Search data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.search.isEnabled |
boolean | Whether enabled applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.wishlist |
object | Wishlist data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.wishlist.isEmpty |
boolean | Whether empty applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.wishlist.itemCount |
number | Item count numeric value. | When the parent is provided; check optional fields. |
viewModel.wishlist.items |
array | Prepared items collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.wishlist.productIdMap |
object | Product id map data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.wishlist.productIdMap.[id] |
boolean | Whether [id] applies; use for display only. | When an entry exists for the identifier. |
viewModel.wishlist.productIds |
array | Prepared product ids collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.wishlist.wishlistId |
number | wishlist identifier; do not load data with it. | When the parent is provided; check optional fields. |
viewModel.wishlist.wishlistKey |
string | Wishlist key value supplied for this context. | When the parent is provided; check optional fields. |
Included templates
Section titled “Included templates”Assets
Section titled “Assets”The reference package uses its bundled theme CSS, Bootstrap and theme JavaScript. Account and checkout controls use the bundled checkout script. Additional page scripts: /theme/reference/category-js. Partials use their caller’s resolved assets.
Example
Section titled “Example”<cfset viewModel = routeConfig.viewModel><cfoutput><h1>#encodeForHtml(viewModel.page.title)#</h1></cfoutput>Use the page-specific structures above for the remaining content.
Behaviour
Section titled “Behaviour”Use prepared URLs and labels. Encode plain text and HTML attributes; preserve only explicitly prepared HTML.