<?php if ($catActive && $catActive->description): ?>
<?php echo $catActive->description; ?>
<?php endif; ?>
<?php if (!$catActive && $di->modules->get('helpdesk')->getConfig('show_faq_search')) : ?>
<?php echo $this->render('blocks/helpdesk/_search-form.phtml') ?>
<?php endif; ?>
<?php if ($categories) : ?>
    <div class="am-block">
        <ul class="am-helpdesk-faq-cat">
        <?php foreach ($categories as $cat) : ?>
            <li class="am-helpdesk-faq-cat-item"><h2><a href="<?php echo $this->url('helpdesk/faq/c/'.urlencode($cat)) ?>"><?php p($cat) ?></a></h2></li>
        <?php endforeach; ?>
        </ul>
    </div>
<?php endif; ?>
<ul class="am-helpdesk-faq-list">
<?php foreach ($faq as $f) : ?>
    <li class="am-helpdesk-faq-list-item"><a href="<?php echo $this->url('helpdesk/faq/i/'.urlencode($f->title)) ?>"><?php p($f->title) ?></a></li>
<?php endforeach; ?>
</ul>