From 40cce64afc9a002e60a1eeef7b30fcb57f70b768 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 17 Mar 2026 18:55:43 -0500 Subject: [PATCH] Add mod_custom hero layout override and bump version to 03.09.01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds src/html/mod_custom/hero.php — a banner-overlay style template override for mod_custom, mirroring Cassiopeia's banner layout pattern. Includes background image support via WebAssetManager and respects the Module Manager's moduleclass_sfx field. Co-Authored-By: Claude Sonnet 4.6 --- .claude/settings.local.json | 8 ++++++++ src/html/mod_custom/hero.php | 36 ++++++++++++++++++++++++++++++++++++ src/templateDetails.xml | 4 ++-- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .claude/settings.local.json create mode 100644 src/html/mod_custom/hero.php diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..a2947a6 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [ + "Bash(git checkout:*)", + "Bash(git branch:*)" + ] + } +} diff --git a/src/html/mod_custom/hero.php b/src/html/mod_custom/hero.php new file mode 100644 index 0000000..ae790e2 --- /dev/null +++ b/src/html/mod_custom/hero.php @@ -0,0 +1,36 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + * + * Template override for mod_custom adding banner-overlay wrapper pattern. + * Based on Cassiopeia's banner layout approach. + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Uri\Uri; + +$modId = 'mod-custom' . $module->id; +$moduleclass = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); + +if ($params->get('backgroundimage')) { + /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ + $wa = $app->getDocument()->getWebAssetManager(); + $wa->addInlineStyle( + '#' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");}', + ['name' => $modId] + ); +} +?> + + diff --git a/src/templateDetails.xml b/src/templateDetails.xml index 5b81628..8d0e6ee 100644 --- a/src/templateDetails.xml +++ b/src/templateDetails.xml @@ -25,7 +25,7 @@ DEFGROUP: Joomla INGROUP: MokoCassiopeia PATH: templates/mokocassiopeia/templateDetails.xml - VERSION: 03.08.04 + VERSION: 03.09.01 BRIEF: Template manifest XML file for MokoCassiopeia ========================================================================= --> @@ -36,7 +36,7 @@ MokoCassiopeia - 03.09.00 + 03.09.01 2026-03-08 Jonathan Miller || Moko Consulting hello@mokoconsulting.tech