This feature allows administrators to define custom CSS classes for individual HTML blocks. It enhances styling flexibility and integrates with common grid systems (e.g., Bootstrap `col-md-6`) by applying user-defined classes to the block's wrapper element. Includes: - A new `custom_class` field in the block model, form, and data handlers. - Database schema updates with an upgrade path to handle potential renames from `column_class`. - Frontend rendering to apply the classes. - Registration of `actionFrontControllerSetMedia` hook to load front-end CSS. - Basic responsive image styling for blocks.
21 lines
913 B
Smarty
21 lines
913 B
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">
|
|
{foreach from=$group.blocks item="block"}
|
|
<div class="customhtml-block col{if !empty($block.custom_class)} {$block.custom_class|escape:'html':'UTF-8'}{/if}">
|
|
{if $block.show_title && !empty($block.title)}
|
|
<div class="customhtml-title">{$block.title|escape:'html':'UTF-8'}</div>
|
|
{/if}
|
|
{if $block.type == 'faq'}
|
|
{include file="module:ws_customhtml/views/templates/hook/_faq_accordion.tpl" block=$block}
|
|
{else}
|
|
<div class="customhtml-content">{$block.content nofilter}</div>
|
|
{/if}
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|