<% content_for :title, raw(finder.name) %>

<header>
  <h1><%= raw(finder.name) %></h1>
  <% if finder.related %>
    <div class='related-links'>
      <ul>
        <% finder.related.each do |link| %>
          <li><%= link_to "View #{link[:title]}", link[:web_url] %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
  <% if finder.primary_organisation %>
    <div class="metadata">
      <dl class="inner-block">
        <dt>From:</dt>
        <dd>
          <%= link_to finder.primary_organisation.title, finder.primary_organisation.web_url %>
        </dd>
      </dl>
    </div>
  <% end %>
</header>

<%= render finder.facets %>
<div class='js-live-search-results-block'>
  <div class="filtered-results">
    <div class="inner-block">
      <div aria-live='assertive' id='js-search-results-info'>
        <%= render_mustache('result_count', @results.to_hash)%>
      </div>
      <div id='js-results'>
        <%= render_mustache('results', @results.to_hash) %>
      </div>
    </div>
  </div>
</div>

<% content_for :title, raw(finder.name) %>

<header>
  <h1><%= raw(finder.name) %></h1>
  <% if finder.related.any? %>
    <div class='related-links'>
      <ul>
        <% finder.related.each do |link| %>
          <li><%= link_to "View #{link[:title]}", link[:web_url] %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
  <% if finder.primary_organisation %>
    <div class="metadata">
      <dl class="inner-block">
        <dt>From:</dt>
        <dd>
          <%= link_to finder.primary_organisation.title, finder.primary_organisation.web_url %>
        </dd>
      </dl>
    </div>
  <% end %>
</header>

<%= render finder.facets %>
<div class='js-live-search-results-block'>
  <div class="filtered-results">
    <div class="inner-block">
      <div aria-live='assertive' id='js-search-results-info'>
        <%= render_mustache('result_count', @results.to_hash)%>
      </div>
      <div id='js-results'>
        <%= render_mustache('results', @results.to_hash) %>
      </div>
    </div>
  </div>
</div>

Remove empty related links div
Remove empty related links div

With related links, the array was empty but wasn't nil, so the empty
tags were being rendered.
