<?php
// Copyright 1999-2024. WebPros International GmbH. All rights reserved.
?>
<a href="#" onclick="apsCatalog.returnToHome()"><?php echo $this->lmsg('smb.components.forms.aps.catalog.gotoHome'); ?></a>
<b>&gt;</b>
<a href="#" onclick='apsCatalog.showCategory("<?php echo $this->categoryGroupName; ?>");'><?php echo $this->categoryGroupTitle; ?></a>
<b>&gt;</b>
<select id='navigation-category'>
  <option value="<?php echo $this->categoryGroupName; ?>"><?php echo $this->lmsg('smb.components.forms.aps.catalog.all'); ?></option>
  <option value="">--------</option>
<?php foreach($this->groupCategories as $category => $categoryData) { ?>
  <option value="<?php echo $this->escape($category);?>" <?php echo ($categoryData['selected'] ? 'selected' : ''); ?>><?php echo $categoryData['display']; ?></option>
<?php } ?>
</select>

<script type="text/javascript">
//<![CDATA[
    document.getElementById('navigation-category').addEventListener('change', function (event) {
        var category = event.target.value;
        if (category) {
            apsCatalog.showCategory(category);
        }
    });
//]]>
</script>
