Files
kupshop/web/templates/koza/block.subsections.christmas.tpl
2025-08-02 16:30:27 +02:00

69 lines
2.8 KiB
Smarty

{if $root}
<div class="row xmas-categories">
{foreach array_slice($sections, 0, 3) as $subCat}
<div class="col-xs-12 col-md-4">
<a href="{url s=category IDcat=$subCat.id}">
{block "xmas-section-img"}
{if $subCat@index == 0}
{$img = "zeny"}
{elseif $subCat@index == 1}
{$img = "muzi"}
{elseif $subCat@index == 2}
{$img = "deti"}
{/if}
<img alt="{$subCat.name}" src="/templates/images/vanoce-{$img}.png?1" class="img-responsive">
{/block}
{$title = explode(" ", $subCat.name_short|default:$subCat.name)}
{if $title|count == 2}
<p class="line"><span>{$title[0]}</span><strong>{$title[1]}</strong></p>
{elseif $title|count == 3}
<p class="line short"><span>{$title[0]} {$title[1]}</span><strong>{$title[2]}</strong></p>
{else}
<p class="simple">{$subCat.name_short|default:$subCat.name}</p>
{/if}
</a>
</div>
{/foreach}
</div>
{if $sections|count > 3}
<h2 class="text-center m-t-2">{t}Nebo vybírejte podle ceny{/t}</h2>
<div class="xmas-btns m-t-2">
{foreach array_slice($sections, 3, 6) as $subCat}
<div class="col-xs-12 col-md-4">
<a class="btn btn-outlined" href="{url s=category IDcat=$subCat.id}">
{$subCat.name}
</a>
</div>
{/foreach}
</div>
{/if}
{else}
<div class="row subsections xmas-subsections">
{if !$smarty.get.title} {* nezobrazovat při filtrování ceny *}
{foreach $sections as $subCat}
<div class="col-xs-6 col-sm-4 col-xl-2 col-xxl-2 m-b-1">
<div class="subsection-wrapper">
<a class="subsection display-table"
href="{url s=category IDcat=$subCat.id IDpd=$body.producer.id producerTitle=$body.producer.title}"
title="{$subCat.title}">
<div class="display-cell">
{$subCat.title}
</div>
</a>
</div>
</div>
{/foreach}
{/if}
<div class="col-xs-12 col-sm-6 col-md-4 col-xl-2 col-xxl-2 m-b-1 xmas-subsection-all">
<div class="subsection-wrapper">
<a class="subsection display-table" href="{url s=category IDcat=$cfg.special.catId}"
title="{t}Zobrazit vánoční tipy na dárky{/t}">
<div class="display-cell">
{t}Další tipy na dárky{/t}
</div>
</a>
</div>
</div>
</div>
{/if}