Example #1
0
<?php 
if (count($this->categoriesList) - 1 >= 0) {
    ?>
    
    <?php 
    echo claro_html_title(get_lang('Sub categories'), 4);
    ?>
    
    <ul>
    <?php 
    foreach ($this->categoriesList as $category) {
        ?>
        <li>
        
        <?php 
        if (claroCategory::countAllCourses($category['id']) + claroCategory::countAllSubCategories($category['id']) > 0) {
            ?>
           <?php 
            echo '<a href="' . $_SERVER['PHP_SELF'] . '?category=' . urlencode($category['id']) . '#categoryContent">' . $category['name'] . '</a>';
            ?>
        <?php 
        } else {
            ?>
            <?php 
            echo $category['name'];
            ?>
        <?php 
        }
        ?>
        
        </li>