{%- from "templates/print_formats/standard_macros.html" import add_header, render_field with context -%} {% for page in layout %}
{{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings, print_heading_template) }}
{% if print_settings.repeat_header_footer %} {% endif %} {% for section in page %}
{%- if doc.print_line_breaks and loop.index != 1 -%}
{%- endif -%} {%- if doc.print_section_headings and section.label and section.has_data -%}

{{ _(section.label) }}

{%- endif -%} {%- set no_of_cols = section.columns|len -%} {% for column in section.columns %}
{% for df in column.fields %} {{ render_field(df, doc, no_of_cols) }} {% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}