PHP Joomla! 6 Joomla! 5 Joomla! 3 (Legacy) Template Override Basic

Render a Specific Module by Type and Title via ModuleHelper

Loads and renders a single module instance by module name (e.g. mod_finder) and exact title regardless of position.

Updated on 24 November 2026 29 copies 119 views
templates/seu_template/html/com_content/article/default.php
<?php

declare(strict_types=1);

use Joomla\CMS\Helper\ModuleHelper;

$module = ModuleHelper::getModule('mod_finder', 'Busca Global');

if ($module && !empty($module->id)) {
    echo ModuleHelper::renderModule($module, ['style' => 'none']);
}
Check !empty($module->id) to confirm the module exists and is published.
templates/seu_template/html/com_content/article/default.php
<?php
$module = JModuleHelper::getModule('mod_finder', 'Busca Global');
if ($module && $module->id) {
    echo JModuleHelper::renderModule($module, array('style' => 'none'));
}
Legacy Joomla 3 version using JModuleHelper::getModule().

Technical explanation and best practices

Unlike getModules($position), calling ModuleHelper::getModule('mod_finder', 'Global Search') lets you embed one targeted module anywhere in an override or layout.

Direct Engineering

Have a Joomla project or technical challenge in mind?

From architectural diagnosis to production deployment, directly with the engineer.