{% capture sidebar_workspace %} {% capture sidebar_links %}{% endcapture %} {% for section in site.sidebar %} {% assign current_url = page.permalink | absolute_url %} {% assign base_btn_class = "btn d-inline-flex align-items-center rounded" %} {% assign base_collapse_class = "collapse" %} {% assign base_list_class = "d-inline-flex align-items-center rounded" %} {% if section.dropdown %} {% assign active_dropdown = false %} {% assign btn_class = base_btn_class %} {% assign collapse_class = base_collapse_class %} {% assign collapse_id = section.name | append: "-collapse" %} {% if current_url contains section.name | append: "/" | prepend: "/" %} {% assign active_dropdown = true %} {% assign btn_class = btn_class | append: " active" %} {% assign collapse_class = collapse_class | append: " show" %} {% endif %} {% capture sidebar_links %}{{ sidebar_links }}
  • {% endcapture %} {% else %} {% assign section_url = section.permalink | absolute_url %} {% if section.version-switch and page.permalink contains "4.0" %} {% assign section_url = section_url | append: "4.0/" %} {% endif %} {% assign class = base_list_class %} {% if section_url == current_url %} {% assign class = class | append: " active" %} {% endif %} {% capture sidebar_links %}{{ sidebar_links }}
  • {{ section.label }}
  • {% endcapture %} {% endif %} {% endfor %} {% endcapture %}