{% import "toolkit/summary-table.html" as summary %}

{% extends "_base_page.html" %}

{% block page_title %}
  Change {{ framework.name }} declaration
{% endblock %}

{% block breadcrumb %}
  {%
      with items = [
          {
              "link": url_for('.index'),
              "label": "Admin home"
          }
      ]
  %}
    {% include "toolkit/breadcrumb.html" %}
  {% endwith %}
{% endblock %}

{% block main_content %}
  <div class="grid-row">
    <div class="service-title">
      {%
        with
        context = supplier.name,
        heading = framework.name + " declaration",
        smaller = True
      %}
        {% include "toolkit/page-heading.html" %}
      {% endwith %}
    </div>
  </div>

  {% for section in content %}
    {{ summary.heading(section.name) }}
    {{ summary.top_link("Edit", url_for('.edit_supplier_declaration_section', supplier_id=supplier.id, framework_slug=framework.slug, section_id=section.id)) }}
    {% call(item) summary.list_table(
      section.questions,
      caption="Declaration",
      empty_message="This supplier not made a declaration",
      field_headings=[
        'Declaration question',
        'Declaration answer'
      ]
    ) %}
      {% call summary.row() %}
        {{ summary.field_name(item.question) }}
        {{ summary[item.type](declaration[item.id]) }}
      {% endcall %}
    {% endcall %}
  {% endfor %}

{% endblock %}

{% import "toolkit/summary-table.html" as summary %}

{% extends "_base_page.html" %}

{% block page_title %}
  Change {{ framework.name }} declaration
{% endblock %}

{% block breadcrumb %}
  {%
      with items = [
          {
              "link": url_for('.index'),
              "label": "Admin home"
          }
      ]
  %}
    {% include "toolkit/breadcrumb.html" %}
  {% endwith %}
{% endblock %}

{% block main_content %}
  <div class="grid-row">
    <div class="service-title">
      {%
        with
        context = supplier.name,
        heading = framework.name + " declaration",
        smaller = True
      %}
        {% include "toolkit/page-heading.html" %}
      {% endwith %}
    </div>
  </div>

  {% for section in content.summary(declaration) %}
    {{ summary.heading(section.name) }}
    {{ summary.top_link("Edit", url_for('.edit_supplier_declaration_section', supplier_id=supplier.id, framework_slug=framework.slug, section_id=section.id)) }}
    {% call(item) summary.list_table(
      section.questions,
      caption="Declaration",
      empty_message="This supplier not made a declaration",
      field_headings=[
        'Declaration question',
        'Declaration answer'
      ]
    ) %}
      {% call summary.row() %}
        {{ summary.field_name(item.question) }}
        {{ summary[item.type](item.value) }}
      {% endcall %}
    {% endcall %}
  {% endfor %}

{% endblock %}

Use content loader summary to correlate questions and answers
Use content loader summary to correlate questions and answers

The registered address wasn't being displayed on the summary page because the multiquestion macro needs the `.summary` method to have been called to tie questions and values together for the component parts of the multiquestion.

Once that has been done we can just pass item.name and item.value through to the relevant macro, rather than passing values from the declaration object directly.
