Skip to content

List Category Title

Availability:

  • Category list


Use list_category_title module to insert a title of the currently viewed category on a page.

Configuration parameters

none

Module source code

{% from "@macros/section_title.twig" import section_title %}

{% set category = ObjectApi.getCategory(category_id) %}

{% set heading = category.customHeading ?: category.name %}

{% set marginClass = category.description ? 'mb-xs-1' : 'mb-xs-3' %}

{{ section_title(heading, { cssClasses: "categories-section-title #{marginClass} mb-sm-0" }) }}

Macros reference

Used Object Api methods

Module configuration schema

[
    {
        "state": "unfolded",
        "label": "General settings",
        "elements": [
            {
                "type": "infobox",
                "name": "infobox",
                "options": {
                    "type": "blank",
                    "message": "#### Display a unique heading instead of the category name%s- Improve your store's SEO by entering something like \"Women's dresses - for everyday and special occasions\" when [editing the category](%s) (in the Search Engine Optimization section).%s- You can configure ribbon appearance in the [Colors and styles](%s) tab.",
                    "placeholderValues": ["\n", "/admin/categories", "\n", "#theme-and-colors"]
                }
            }
        ]
    }
]