jmodule_get_module($name, $title = null)
Get a module published on the current page by its name or folder.
Parameters
string
$name Name of the module (real, eg ‘Breadcrumbs’ or folder, eg ‘mod_breadcrumbs’)array
$title [optional] Title of the module.
Returns
\stdClass|null
- The first module found that matches the name if found. Empty object if module not found and name starts with mod_
. Null otherwise.
Examples
{# Retrieve a `mod_menu` module #}
{% set module = jmodule_get_module('mod_menu') %}
{# Retrieve a `mod_menu` module by its name (name is the module element removing the mod_ part). #}
{% set module = jmodule_get_module('menu') %}
{# Retrieve a `mod_menu` module with a specific title. #}
{% set module = jmodule_get_module('mod_menu', 'Main Menu') %}