{%- macro card(title, image, url, text_primary=False) -%} {%- set align_class = resolve_class({ 'text-right': text_primary, 'text-centre': align == 'Center', 'text-left': align == 'Left', }) -%}
{% if image %} {{ title }} {% else %}
{{ xhiveframework.utils.get_abbr(title or '') }}
{% endif %}
{{ title or '' }}
{%- endmacro -%}
{%- if title -%}

{{ title }}

{%- endif -%} {%- if subtitle -%}

{{ subtitle }}

{%- endif -%}
{%- for index in ['1', '2', '3', '4', '5', '6', '7', '8'] -%} {%- set category = values['category_' + index] -%} {%- if category -%} {%- set category = xhiveframework.get_doc("Item Group", category) -%} {{ card(category.name, category.image, category.route) }} {%- endif -%} {%- endfor -%}