
{% for item in include.sidebar %}
  {% if item.section %}
    {% capture titleized %}{{include.prefix}}-{{ item.title | downcase | replace: ' ','' | replace: ':','', | replace: '/','' | replace: '(', '-' | replace: ')', '' }}{% endcapture %}
    <div>
      <div class="link">
        <span class="glyphicon glyphicon-chevron-right navbar-arrow"></span>
        <a role="button" data-toggle="collapse" href="#{{titleized}}" aria-expanded="false" aria-controls="{{titleized}}">
          {{item.title}}
        </a>
      </div>
      <div class="section">
        <div class="collapse" id="{{ titleized }}">
          {% include sidebar.html sidebar=item.section prefix=titleized %}
        </div>
      </div>
    </div>
  {% else %}
    {% assign prefix = item.path | slice: 0, 4 %}
    {% if prefix == "http" %}
      {% assign target=" target='_blank'" %}
    {% else %}
      {% assign target="" %}
    {% endif %}
    <div class="link">
      <a class="item" data-title="{{ item.title }}" href="{{ site.baseurl }}/{{ page.version }}{{ item.path }}"{{ target }}>
        {{item.title}}
      </a>
    </div>
  {% endif %}
{% endfor %}
