Files
ws_customhtml/views/templates/hook/customhtml_block.tpl
T
isabelle 06e98a429b feat(main): Introduce USP block type and custom classes for HTML groups
This release adds a new "USP" (Unique Selling Proposition) block type,
allowing for flexible display of image-based selling points with optional links.

Additionally, administrators can now assign custom CSS classes to Custom HTML Groups,
enhancing layout and styling capabilities.

Includes a refinement to the FAQ accordion template to ensure questions without answers
do not display a collapse button, improving usability.

Updates module version to 1.13.0 with a database upgrade script for the new `custom_class` column.
2026-08-20 15:22:15 +02:00

34 lines
1.9 KiB
Smarty

{if !empty($groupList)}
<div class="customhtml-container {$hookName|escape:'html':'UTF-8'}--container">
{foreach from=$groupList item="group"}
<div class="customhtml-group customhtml-group-{$group.id_ws_customhtml_group|intval} row{if !empty($group.custom_class)} {$group.custom_class|escape:'html':'UTF-8'}{/if}">
{foreach from=$group.blocks item="block"}
<div class="customhtml-block col{if !empty($block.custom_class)} {$block.custom_class|escape:'html':'UTF-8'}{/if}">
{assign var="customhtmlOverridePath" value="{$smarty.const._PS_THEME_DIR_}modules/ws_customhtml/views/templates/hook/{$hookName}/{$block.type}.tpl"}
{if file_exists($customhtmlOverridePath)}
{include file="module:ws_customhtml/views/templates/hook/`$hookName`/`$block.type`.tpl" block=$block group=$group hookName=$hookName}
{elseif $block.type == 'faq'}
{if $block.show_title && !empty($block.title)}
<div class="customhtml-title">{$block.title|escape:'html':'UTF-8'}</div>
{/if}
{include file="module:ws_customhtml/views/templates/hook/_faq_accordion.tpl" block=$block}
{elseif $block.type == 'banner'}
{include file="module:ws_customhtml/views/templates/hook/_banner.tpl" block=$block}
{elseif $block.type == 'alert'}
{include file="module:ws_customhtml/views/templates/hook/_alert.tpl" block=$block}
{elseif $block.type == 'usp'}
{include file="module:ws_customhtml/views/templates/hook/_usp.tpl" block=$block}
{else}
{if $block.show_title && !empty($block.title)}
<div class="customhtml-title">{$block.title|escape:'html':'UTF-8'}</div>
{/if}
<div class="customhtml-content">{$block.content nofilter}</div>
{/if}
</div>
{/foreach}
</div>
{/foreach}
</div>
{/if}