{% if projects|length > 0 %}
<!-- Project input/select -->
<div class="project select">
  <div class="button breadcrumbs selector">
    {% if project and project.name != '' %}
    <span class="title" data-slug="{{ project.slug }}">{{ project.name }}</span>
    {% else %}
    <span class="title">Select website</span>
    {% endif %}
  </div>
  <div class="menu">
    <div class="search-wrapper clearfix">
      <div class="icon fa fa-search"></div>
      <input type="search" autocomplete="off">
    </div>
    <ul>
      {% for project in projects %}
      <li class="clearfix">
        <span class="project-name"
          data-slug="{{ project.slug }}"
          data-locales="{% for l in project.locales.all() %}{{ l.code|lower }}{% if not loop.last %},{% endif %}{% endfor %}"
          data-parts="{{ project.parts }}">{{ project.name }}</span>
        <span class="project-url">{{ project.url }}</span>
      </li>
      {% endfor %}
      <li class="no-match">No results</li>
    </ul>
  </div>
</div>
{% endif %}

{% if projects|length > 0 %}
<!-- Project input/select -->
<div class="project select">
  <div class="button breadcrumbs selector">
    {% if project and project.name != '' %}
    <span class="title" data-slug="{{ project.slug }}">{{ project.name }}</span>
    {% else %}
    <span class="title">Select website</span>
    {% endif %}
  </div>
  <div class="menu">
    <div class="search-wrapper clearfix">
      <div class="icon fa fa-search"></div>
      <input type="search" autocomplete="off">
    </div>
    <ul>
      {% for project in projects.order_by("name") %}
      <li class="clearfix">
        <span class="project-name"
          data-slug="{{ project.slug }}"
          data-locales="{% for l in project.locales.all() %}{{ l.code|lower }}{% if not loop.last %},{% endif %}{% endfor %}"
          data-parts="{{ project.parts }}">{{ project.name }}</span>
        <span class="project-url">{{ project.url }}</span>
      </li>
      {% endfor %}
      <li class="no-match">No results</li>
    </ul>
  </div>
</div>
{% endif %}

Sort projects in the projects menu alphabetically
Sort projects in the projects menu alphabetically
