<ul class="toctree nav nav-list">
  <li class="navleft-item">CrateDB</li>
  <ul>
    {% if project == 'CrateDB Tutorials' %}
      <li class="current">
        <a class="current-active" href="{{ pathto(master_doc) }}">Tutorials</a>
        {{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
      </li>
    {% else %}
      <li class="navleft-item"><a href="/docs/crate/tutorials/">Tutorials</a></li>
    {% endif %}
    {% if project == 'CrateDB How-To Guides' %}
      <li class="current">
        <a class="current-active" href="{{ pathto(master_doc) }}">How-To Guides</a>
        {{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
      </li>
    {% else %}
      <li class="navleft-item"><a href="/docs/crate/howtos/">How-To Guides</a></li>
    {% endif %}
    {% if project == 'CrateDB Reference' %}
      <li class="current">
        <a class="current-active" href="{{ pathto(master_doc) }}">Reference</a>
        {{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
      </li>
    {% else %}
      <li class="navleft-item"><a href="/docs/crate/reference/">Reference</a></li>
    {% endif %}
    {% if project == 'CrateDB Admin UI' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">Admin UI</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/crate/admin-ui/">Admin UI</a></li>
    {% endif %}
    {% if project == 'CrateDB Crash' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">Crash CLI</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/crate/crash/">Crash CLI</a></li>
    {% endif %}
  </ul>

  <li class="navleft-item">CrateDB Cloud</li>
  <ul>
    {% if project == 'Cloud Tutorials' %}
      <li class="current">
        <a class="current-active" href="{{ pathto(master_doc) }}">Tutorials</a>
        {{ toctree(maxdepth=2|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
      </li>
    {% else %}
      <li class="navleft-item"><a href="/docs/cloud/tutorials/">Tutorials</a></li>
    {% endif %}
    {% if project == 'Cloud How-To Guides' %}
      <li class="current">
        <a class="current-active" href="{{ pathto(master_doc) }}">How-To Guides</a>
        {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
      </li>
    {% else %}
      <li class="navleft-item"><a href="/docs/cloud/howtos/">How-To Guides</a></li>
    {% endif %}
    {% if project == 'Cloud Reference' %}
      <li class="current">
        <a class="current-active" href="{{ pathto(master_doc) }}">Reference</a>
        {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
      </li>
    {% else %}
      <li class="navleft-item"><a href="/docs/cloud/reference/">Reference</a></li>
    {% endif %}
    {% if project == 'Croud CLI' %}
      <li class="current">
        <a class="current-active" href="{{ pathto(master_doc) }}">Croud CLI</a>
        {{ toctree(maxdepth=2|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
      </li>
    {% else %}
      <li class="navleft-item"><a href="/docs/cloud/cli/">Croud CLI</a></li>
    {% endif %}
  </ul>

  <li class="navleft-item">Clients</li>
  <ul>
    {% if project == 'CrateDB JDBC' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">JDBC</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/clients/jdbc/">JDBC</a></li>
    {% endif %}
    {% if project == 'CrateDB DBAL' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">PHP DBAL</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/clients/dbal/">PHP DBAL</a></li>
    {% endif %}
    {% if project == 'CrateDB PDO' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">PHP PDO</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/clients/pdo/">PHP PDO</a></li>
    {% endif %}
    {% if project == 'CrateDB Python' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">Python</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/clients/python/">Python</a></li>
    {% endif %}
    {% if project == 'CrateDB Npgsql' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">.NET Npgsql</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/clients/npgsql/">.NET Npgsql</a></li>
    {% endif %}
  </ul>

  <li class="navleft-item border-top"><a href="https://github.com/crate/crate-sample-apps">Sample Applications</a></li>

  {% if project == 'SQL 99' %}
  <li class="current">
    <a class="current-active" href="{{ pathto(master_doc) }}">SQL-99 Complete, Really</a>
    {{ toctree(maxdepth=2|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
  </li>
  {% endif %}

  <li class="navleft-item"><a href="/support/">Support</a></li>
</ul>
