<?php if($handler->getFacetQueryTotalCount($rsp['facet_counts']['facet_queries'], $categoryList) > 0){ ?>
  <h2><?php echo $categoryName ?></h2>
  <div>
  <?php foreach($categoryList as $facetQueryPair){ ?>
    <?php foreach($facetQueryPair as $name => $query){ ?>
      <?php $count = $rsp['facet_counts']['facet_queries'][$query]; ?>
      <?php if($count > 0){ ?>
        <a href="./index.php?<?php echo $handler->getLinkStr($query,0) ?>"><?php echo htmlspecialchars($name) ?>(<?php echo $count ?>)</a><br>
      <?php } ?>
    <?php } ?>
  <?php } ?>	
  </div>
<?php } ?>
