{% if versions %}
<div class="sidebar-tree">
  <p class="version-select">
    <span class="caption-text">Other Versions</span>
  </p> 
  <div id="versions">
    {% if versions.branches %}
    <span class="caption-text">{{ _('Branches') }}</span>
    <ul>
      {%- for item in versions.branches %}
      <li><a class="reference internal" href="{{ item.url }}">{{ item.name }}</a></li>
      {%- endfor %}
    </ul>
    {% endif %}
    {% if versions.tags %}
    <span class="caption-text">{{ _('Tags') }}</span>
    <ul>
      {%- for item in versions.tags %}
      <li><a class="reference internal" href="{{ item.url }}">{{ item.name }}</a></li>
      {%- endfor %}
    </ul>
    {% endif %}
  </div>
</div>
{% endif %}
