{% block layout_header_categories_list %}
{% set categoryNumber = setting|split('-')[1] %}
{% set categoryId = theme_config('headerStylesLayoutHeaderCategoriesParentCategory' ~ categoryNumber) %}
{% set categoriesExtension = page.extensions.categories %}
{% if( categoriesExtension is defined and categoriesExtension is not empty and
categoryId is defined and categoryId is not empty ) %}
{% set root = page.extensions.categories|filter((u) => u.id == categoryId)|first %}
{% if root.children %}
{% for childTreeItem in root.children %}
{% sw_include '@Storefront/storefront/layout/header/category-dropdown.html.twig' with {
'rootTreeItem': childTreeItem,
} %}
{% endfor %}
{% endif %}
{% endif %}
{% endblock %}