* * This file is part of a Moko Consulting project. * * SPDX-License-Identifier: GPL-3.0-or-later */ /** * Default layout override for mod_custom. * Adds showtitle support and respects all module settings. */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Uri\Uri; $modId = 'mod-custom' . $module->id; $suffix = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_COMPAT, 'UTF-8'); $headerClass = htmlspecialchars($params->get('header_class', ''), ENT_COMPAT, 'UTF-8'); if ($params->get('backgroundimage')) { /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $bgUrl = Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url; $wa->addInlineStyle( '#' . $modId . '{--hero-bg-image: url("' . $bgUrl . '"); background-image: var(--hero-bg-image);}', ['name' => $modId] ); } ?>
showtitle) : ?> < class="mod-custom__title">title; ?>> content; ?>