feat(main): Add custom CSS classes to HTML blocks

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.
This commit is contained in:
2026-08-13 11:33:24 +02:00
parent d0da05845a
commit fb641fc236
14 changed files with 101 additions and 4 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
{if !empty($groupList)}
<div class="customhtml-container {$hookName|escape:'html':'UTF-8'}--container">
{foreach from=$groupList item="group"}
<div class="customhtml-group">
<div class="customhtml-group customhtml-group-{$group.id_ws_customhtml_group|intval} row">
{foreach from=$group.blocks item="block"}
<div class="customhtml-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}