{%- if title -%}

{{ title }}

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

{{ subtitle }}

{%- endif -%}
{% set ns = namespace(tabs=[]) %} {%- for index in ['1', '2', '3', '4', '5', '6'] -%} {%- set buttonid = 'id-' + frappe.utils.generate_hash('TabButton', 12) -%} {%- set panelid = 'id-' + frappe.utils.generate_hash('TabPanel', 12) -%} {%- set tab = { 'title': values['tab_' + index + '_title'], 'content': values['tab_' + index + '_content'], 'buttonid': buttonid, 'panelid': panelid, } -%} {%- if tab.title and tab.content -%} {%- set ns.tabs = ns.tabs + [tab] -%} {%- endif -%} {%- endfor -%}
{%- for tab in ns.tabs -%} {%- set first_tab = true if loop.index0 == 0 else false -%}
{{ frappe.utils.md_to_html(tab.content) }}
{%- endfor -%}