Exemple #1
0
function drawSubcategory($category)
{
    if (osc_count_subcategories2() > 0) {
        osc_category_move_to_children();
        ?>
            <ul>
                <?php 
        while (osc_has_categories()) {
            ?>
                    <li><a class="category cat_<?php 
            echo osc_category_id();
            ?>
" href="<?php 
            echo osc_search_category_url();
            ?>
"><?php 
            echo osc_category_name();
            ?>
</a> <span>(<?php 
            echo osc_category_total_items();
            ?>
)</span><?php 
            drawSubcategory(osc_category());
            ?>
</li>
                <?php 
        }
        ?>
            </ul>
        <?php 
        osc_category_move_to_parent();
    }
}
Exemple #2
0
function Subcategory($category)
{
    if (osc_count_subcategories2() > 0) {
        osc_category_move_to_children();
        ?>
            <div id="cat_<?php 
        echo $category['pk_i_id'];
        ?>
" class="panel-collapse collapse">
                                <div class="panel-body">
                                    <ul>
                <?php 
        while (osc_has_categories()) {
            ?>
                    <?php 
            if (osc_category_total_items() < 1 && nc_osc_hide_categories()) {
                continue;
            }
            ?>
 
                    <li>
                    <a data-parent="#cat_<?php 
            echo $category['pk_i_id'];
            ?>
" href="<?php 
            echo osc_search_category_url();
            ?>
">
                        <?php 
            echo osc_category_name();
            ?>
                    </a>
                    <span>(<?php 
            echo osc_category_total_items();
            ?>
)</span><?php 
            Subcategory(osc_category());
            ?>
                    </li>
                <?php 
        }
        ?>
            </ul>
        </div>
    </div>
        <?php 
        osc_category_move_to_parent();
    }
}