{% if sites is defined %}
Site: 
<div class="btn-group" id="site-selection">
    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
        {{ current_site|default('All') }}
        <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
        {% for name, urls in sites %}
        <li class="dropdown-submenu {% if name == current_site %}active{% endif %}">
            <a href="{{ path(route, {'site': name}) }}">{{ name }}
            </a>
            <ul class="dropdown-menu" id="sites-url">
               <li><a href="{{ path(route, {'site': name}) }}">All</a></li> 
               <li class="divider"><li>
               {% for url in urls %}
                   <li><a href="{{ path(route, {'site': name, 'url': url}) }}">{{ url }}</a></li>
               {% endfor %}
            </ul>
        </li>
        {% endfor %}
    </ul>
</div>
{% endif %}

{% if sites is defined %}
Site: 
<div class="btn-group" id="site-selection">
    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
        {{ current_site|default('Select one') }}
        <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
        {% for name, urls in sites %}
        <li class="dropdown-submenu {% if name == current_site %}active{% endif %}">
            <a href="{{ path(route, {'site': name}) }}">{{ name }}
            </a>
            <ul class="dropdown-menu" id="sites-url">
               <li><a href="{{ path(route, {'site': name}) }}">All</a></li> 
               <li class="divider"><li>
               {% for url in urls %}
                   <li><a href="{{ path(route, {'site': name, 'url': url}) }}">{{ url }}</a></li>
               {% endfor %}
            </ul>
        </li>
        {% endfor %}
    </ul>
</div>
{% endif %}

Change default value of sites selection button when no item selected
Change default value of sites selection button when no item selected
