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.
This commit is contained in:
2026-08-20 15:22:15 +02:00
parent a4e479490b
commit 06e98a429b
19 changed files with 156 additions and 66 deletions
+5 -1
View File
@@ -16,6 +16,9 @@ class CustomHtmlGroup extends ObjectModel
/** @var string */
public $title = '';
/** @var string */
public $custom_class = '';
/** @var int */
public $active = 1;
@@ -34,6 +37,7 @@ class CustomHtmlGroup extends ObjectModel
'fields' => [
'hook_name' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64],
'title' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 256],
'custom_class' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => false, 'size' => 128],
'active' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'],
'ordering' => ['type' => self::TYPE_INT, 'validate' => 'isInt'],
'date_add' => ['type' => self::TYPE_DATE, 'validate' => 'isDate'],
@@ -44,7 +48,7 @@ class CustomHtmlGroup extends ObjectModel
public static function getActiveByHookName(string $hookName): array
{
$result = Db::getInstance()->executeS(
'SELECT `id_ws_customhtml_group`, `title`, `active`, `ordering`
'SELECT `id_ws_customhtml_group`, `title`, `active`, `custom_class`, `ordering`
FROM `' . _DB_PREFIX_ . 'ws_customhtml_group`
WHERE `hook_name` = \'' . pSQL($hookName) . '\'
AND `active` = 1