<div class="relations">
<h3>{{ _('Related Topics') }}</h3>
<ul>
  <li><a href="{{ pathto(master_doc) }}">{{ _('Documentation overview') }}</a><ul>
  {%- for parent in parents %}
  <li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
  {%- endfor %}
    {%- if prev %}
      <li>{{ _('Previous') }}: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
        }}">{{ prev.title }}</a></li>
    {%- endif %}
    {%- if next %}
      <li>{{ _('Next') }}: <a href="{{ next.link|e }}" title="{{ _('next chapter')
        }}">{{ next.title }}</a></li>
    {%- endif %}
  {%- for parent in parents %}
  </ul></li>
  {%- endfor %}
  </ul></li>
</ul>
</div>
