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

61 lines
2.5 KiB
Smarty

{if $root}
<div class="row xmas-categories">
{foreach array_slice($sections, 0, 6) as $subCat}
<div class="col-xs-12 col-md-4">
<a href="{url s=category IDcat=$subCat.id}">
{if $subCat.photo}
<img alt="{$subCat.name}" src="{get_photo photo=$subCat.photo type=section size=17}" class="img-responsive">
{else}
<img alt="{$subCat.name}" src="/static/images/xmas/ujeda_xmas_light.jpg" class="img-responsive">
{/if}
{$title = explode(" ", $subCat.name_short|default:$subCat.name)}
{if $title|count == 2 and $subCat@index < 3}
<p class="line"><span>{$title[0]}</span><strong>{$title[1]}</strong></p>
{elseif $title|count == 3 and $subCat@index < 3}
<p class="line"><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 > 6}
<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, 6) as $subCat}
<div class="col-xs-12 col-md-4">
<a class="btn btn-outlined btn-outlined--pink" href="{url s=category IDcat=$subCat.id}">
{$subCat.name}
</a>
</div>
{/foreach}
</div>
{/if}
{else}
<div class="row subsections xmas-subsections">
{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}" title="{$subCat.title}">
<div class="display-cell">
{$subCat.title}
</div>
</a>
</div>
</div>
{/foreach}
<div class="col-xs-6 col-sm-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}