-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8010773
commit 2edd79c
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{if !empty($categories)} | ||
{$num_columns = ((isset($num_columns)) ? $num_columns : 2)} | ||
{$class_names = ['col-md-12', 'col-md-6', 'col-md-4', 'col-md-3']} | ||
|
||
<div class="row ia-cats"> | ||
{foreach $categories as $category} | ||
<div class="{$class_names[$num_columns - 1]}"> | ||
<div class="ia-cat"> | ||
{if isset($icons) && $icons} | ||
<span class="fa{if !empty($category.icon)} {$category.icon}{else} fa-folder-open{/if}"></span> | ||
{/if} | ||
|
||
<a href="{$category.url}">{$category.title|escape:'html'}</a> | ||
{if isset($show_amount) && $show_amount} | ||
— {$category.num|default:0} | ||
{/if} | ||
|
||
{if isset($category.subcategories) && $category.subcategories} | ||
<div class="ia-cat__sub"> | ||
{foreach $category.subcategories as $subcategory} | ||
<a href="{ia_url type='url' item=$item data=$subcategory}">{$subcategory.title|escape:'html'}</a>{if !$subcategory@last}, {/if} | ||
{/foreach} | ||
</div> | ||
{/if} | ||
</div> | ||
</div> | ||
|
||
{if $category@iteration % $num_columns == 0 && !$category@last} | ||
</div> | ||
<div class="row ia-cats"> | ||
{/if} | ||
{/foreach} | ||
</div> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters