Files
isabelle 85b56f1a13 fix(main): Separate slide tpl from banner tpl
also added a toggle column for active in the group view
2026-09-08 18:05:59 +02:00

60 lines
3.6 KiB
Smarty

{if !empty($block.slides)}
{if $block.slider_mode == 'responsive'}
{block name=slider_responsive}
<div class="d-lg-none">
<div class="swiper customhtml-slider" data-swiper="{$block.slider_config|escape:'html':'UTF-8'}">
<div class="swiper-wrapper">
{foreach from=$block.slides item="slide" name="slides"}
{assign var="count" value=$smarty.foreach.slides.iteration|string_format:"%02d"}
<div class="swiper-slide">
{assign var="customhtmlOverridePath" value="{$smarty.const._PS_THEME_DIR_}modules/ws_customhtml/views/templates/hook/{$hookName}/slide.tpl"}
{if file_exists($customhtmlOverridePath)}
{include file="module:ws_customhtml/views/templates/hook/`$hookName`/slide.tpl" block=$slide group=$group hookName=$hookName count=$count}
{else}
{include file="module:ws_customhtml/views/templates/hook/_slide.tpl" block=$slide count=$count}
{/if}
</div>
{/foreach}
</div>
</div>
</div>
<div class="row d-none d-lg-flex customhtml-slider-grid">
{foreach from=$block.slides item="slide" name="slides"}
{assign var="count" value=$smarty.foreach.slides.iteration|string_format:"%02d"}
{if !empty($block.slider_desktop_column_width)}
<div class="customhtml-slider-grid-item" style="flex: 0 0 {$block.slider_desktop_column_width|escape:'html':'UTF-8'}; max-width: {$block.slider_desktop_column_width|escape:'html':'UTF-8'};">
{else}
<div class="customhtml-slider-grid-item col">
{/if}
{assign var="customhtmlOverridePath" value="{$smarty.const._PS_THEME_DIR_}modules/ws_customhtml/views/templates/hook/{$hookName}/slide.tpl"}
{if file_exists($customhtmlOverridePath)}
{include file="module:ws_customhtml/views/templates/hook/`$hookName`/slide.tpl" block=$slide group=$group hookName=$hookName count=$count}
{else}
{include file="module:ws_customhtml/views/templates/hook/_slide.tpl" block=$slide count=$count}
{/if}
</div>
{/foreach}
</div>
{/block}
{/if}
{if $block.slider_mode != 'responsive'}
{block name=slider_always}
<div class="swiper customhtml-slider" data-swiper="{$block.slider_config|escape:'html':'UTF-8'}">
<div class="swiper-wrapper">
{foreach from=$block.slides item="slide" name="slides"}
{assign var="count" value=$smarty.foreach.slides.iteration|string_format:"%02d"}
<div class="swiper-slide">
{assign var="customhtmlOverridePath" value="{$smarty.const._PS_THEME_DIR_}modules/ws_customhtml/views/templates/hook/{$hookName}/slide.tpl"}
{if file_exists($customhtmlOverridePath)}
{include file="module:ws_customhtml/views/templates/hook/`$hookName`/slide.tpl" block=$slide group=$group hookName=$hookName count=$count}
{else}
{include file="module:ws_customhtml/views/templates/hook/_slide.tpl" block=$slide count=$count}
{/if}
</div>
{/foreach}
</div>
</div>
{/block}
{/if}
{/if}