<%
  policies ||= []
  topics ||= []
%>
<aside class="meta">
  <div class="inner-heading">
    <dl>
      <% if document.organisations.any?  %>
        <dt><%= t('document.headings.organisations', count: document.organisations.length) %>:</dt>
        <dd>
          <%= render  partial: 'organisations/organisations_name_list',
                      locals: { organisations: document.sorted_organisations,
                                lead_organisations: document.lead_organisations } %>
        </dd>
      <% end %>
      <%= render  partial: 'document_extra_metadata',
                  locals: { document: document } %>
      <%= render  partial: 'documents/change_notes',
                  locals: { document: document } %>

      <% document_metadata(document, policies, topics).each do |metadata| %>
        <dt><%= metadata[:title] %>:</dt>
        <dd class="js-hide-other-links <%= metadata.fetch(:classes, []).join(' ') %>">
          <%= metadata[:data].to_sentence.html_safe %>
        </dd>
      <% end %>

      <% if document.location && document.location.present? %>
        <dt><%= t('document.headings.location') %>:</dt>
        <dd class="location"><%= document.location %></dd>
      <% end %>

    </dl>
  </div>
</aside>

<%
  policies ||= []
  topics ||= []
%>
<aside class="meta">
  <div class="inner-heading">
    <dl>
      <% if document.organisations.any?  %>
        <dt><%= t('document.headings.organisations', count: document.organisations.length) %>:</dt>
        <dd>
          <%= render  partial: 'organisations/organisations_name_list',
                      locals: { organisations: document.sorted_organisations,
                                lead_organisations: document.lead_organisations } %>
        </dd>
      <% end %>
      <%= render  partial: 'document_extra_metadata',
                  locals: { document: document } %>
      <%= render  partial: 'documents/change_notes',
                  locals: { document: document } %>

      <% document_metadata(document, policies, topics).each do |metadata| %>
        <dt><%= metadata[:title] %>:</dt>
        <dd class="js-hide-other-links <%= metadata.fetch(:classes, []).join(' ') %>">
          <%= metadata[:data].to_sentence.html_safe %>
        </dd>
      <% end %>

      <% if document.primary_mainstream_category && document.primary_mainstream_category.present? %>
        <dt>Primary category:</dt>
        <dd>
          <%= link_to document.primary_mainstream_category.title,
                      Whitehall.url_maker.mainstream_category_path(document.primary_mainstream_category) %>
        </dd>
      <% end %>

      <% if document.location && document.location.present? %>
        <dt><%= t('document.headings.location') %>:</dt>
        <dd class="location"><%= document.location %></dd>
      <% end %>

    </dl>
  </div>
</aside>

Add parent category document metadata
Add parent category document metadata

To replace functionality previously provided by the breadcrumb
