<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">
      Departments
    </h3>
  </div>
  <div class="list-group">
    <check if="{{ isset(@dept) }}">
        <a class="list-group-item"
           href="{{ @BASE . '/' . @CATALOG }}">
          <b>
            <span class="pull-right fa fa-chevron-up"></span>
            Back to Top
          </b>
        </a>
      </div>
      <div class="panel-heading">
        <h3 class="panel-title">
          {{ @dept.name }}
        </h3>
      </div>
      <div class="list-group">
    </check>
    <repeat group="{{ @departments }}" value="{{ @item }}">
      <a class="list-group-item {{ (isset(@subdept) && @subdept.slug == @item.slug) ? 'active' : '' }}"
         href="{{ @BASE . '/' . @CATALOG . '/' . (isset(@dept) ? (@dept.slug . '/') : '') . @item.slug }}">
        {{ @item.name }}
      </a>
    </repeat>
    <a class="list-group-item"
       href="{{ '/' . @CATALOG . '/brand' }}">
      Brands
    </a>
  </div>
</div>

<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">
      Departments
    </h3>
  </div>
  <div class="list-group">
    <check if="{{ isset(@dept) }}">
        <a class="list-group-item"
           href="{{ @BASE . '/' . @CATALOG }}">
          <b>
            <span class="pull-right fa fa-chevron-up"></span>
            Back to Top
          </b>
        </a>
      </div>
      <div class="panel-heading">
        <h3 class="panel-title">
          {{ @dept.name }}
        </h3>
      </div>
      <div class="list-group">
    </check>
    <repeat group="{{ @departments }}" value="{{ @item }}">
      <a class="list-group-item {{ (isset(@subdept) && @subdept.slug == @item.slug) ? 'active' : '' }}"
         href="{{ @BASE . '/' . @CATALOG . '/' . (isset(@dept) ? (@dept.slug . '/') : '') . @item.slug }}">
        {{ @item.name }}
      </a>
    </repeat>
    <check if="{{ !isset(@dept) }}">
      <a class="list-group-item list-group-item-info"
         href="{{ '/' . @CATALOG . '/brand' }}">
        Brands
      </a>
    </check>
  </div>
</div>

Tweak link to brands, only show at top level
Tweak link to brands, only show at top level
