fix(main): Separate slide tpl from banner tpl

also added a toggle column for active in the group view
This commit is contained in:
2026-09-08 18:05:59 +02:00
parent 620c34e353
commit 85b56f1a13
5 changed files with 45 additions and 11 deletions
+1
View File
@@ -0,0 +1 @@
{extends file="module:ws_customhtml/views/templates/hook/_banner.tpl"}
+9 -9
View File
@@ -7,11 +7,11 @@
{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}/banner.tpl"}
{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`/banner.tpl" block=$slide group=$group hookName=$hookName count=$count}
{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/_banner.tpl" block=$slide count=$count}
{include file="module:ws_customhtml/views/templates/hook/_slide.tpl" block=$slide count=$count}
{/if}
</div>
{/foreach}
@@ -26,11 +26,11 @@
{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}/banner.tpl"}
{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`/banner.tpl" block=$slide group=$group hookName=$hookName count=$count}
{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/_banner.tpl" block=$slide count=$count}
{include file="module:ws_customhtml/views/templates/hook/_slide.tpl" block=$slide count=$count}
{/if}
</div>
{/foreach}
@@ -44,11 +44,11 @@
{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}/banner.tpl"}
{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`/banner.tpl" block=$slide group=$group hookName=$hookName count=$count}
{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/_banner.tpl" block=$slide count=$count}
{include file="module:ws_customhtml/views/templates/hook/_slide.tpl" block=$slide count=$count}
{/if}
</div>
{/foreach}