<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' %}
    <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 == 'Crate Guide' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">Guide</a>
      {{ toctree(maxdepth=3|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/crate/guide/">Guide</a></li>
    {% endif %}
  </ul>

  <li class="navleft-item">CrateDB Cloud</li>
  <ul>
    {% if project == 'Cloud Getting Started' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">Getting Started</a>
      {{ toctree(maxdepth=2|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/cloud/getting-started/">Getting Started</a></li>
    {% endif %}
    {% if project == 'Cloud Console' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">Console</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/cloud/console/">Console</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 %}
    {% if project == 'IoT Data Platform' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">IoT Data Platform</a>
      {{ toctree(maxdepth=2|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% endif %}
  </ul>

  <li class="navleft-item">CrateDB Clients</li>
  <ul>
    {% if project == 'Crate Admin' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">CrateDB Admin UI</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/clients/admin-ui/">CrateDB Admin UI</a></li>
    {% endif %}
    {% if project == 'Crate Shell' %}
    <li class="current">
      <a class="current-active" href="{{ pathto(master_doc) }}">CrateDB Shell</a>
      {{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
    </li>
    {% else %}
    <li class="navleft-item"><a href="/docs/clients/crash/">CrateDB Shell</a></li>
    {% endif %}
    {% if project == 'Crate JDBC Driver' %}
    <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 == 'Crate 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 == 'Crate 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 == 'Crate 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 == 'Crate 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>
