Module overrides with showtitle, suffix, and header_tag support + CSS

New default.php overrides for 11 Joomla core modules:
- mod_custom (default + updated hero layout)
- mod_articles_latest, mod_articles_popular, mod_articles_news
- mod_articles_category, mod_breadcrumbs, mod_footer
- mod_login (BS5 form with FA7 icons), mod_finder (BS5 search)
- mod_tags_popular (badge layout), mod_tags_similar, mod_related_items

All overrides consistently respect:
- $module->showtitle — renders title only when enabled
- header_tag param — configurable heading level (h1-h6)
- header_class param — custom CSS class on the title
- moduleclass_sfx — custom suffix class on the wrapper

CSS additions in template.css:
- Shared __title styles for all module headings
- List styling for article/tag/related modules
- Newsflash card layout, tag badges, search form, login form
- Breadcrumb and footer module styling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 18:46:17 -05:00
parent 4a0b905c6c
commit 4017e45975
25 changed files with 1604 additions and 4 deletions

View File

@@ -18,8 +18,10 @@ 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');
$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 */
@@ -30,9 +32,11 @@ if ($params->get('backgroundimage')) {
);
}
?>
<div class="mod-custom custom banner-overlay custom-hero<?php echo $moduleclass ? ' ' . $moduleclass : ''; ?>" id="<?php echo $modId; ?>">
<div class="mod-custom custom banner-overlay custom-hero<?php echo $suffix ? ' ' . $suffix : ''; ?>" id="<?php echo $modId; ?>">
<div class="overlay">
<?php if ($module->showtitle) : ?>
<<?php echo $headerTag; ?> class="mod-custom__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
</div>