PHP
Joomla! 6
Joomla! 5
Joomla! 3 (Legacy)
Template
Basic
Read Template Parameters Inside the Template
Directly reads configuration fields from the active template style inside index.php or component.php.
templates/minimalista_webdev/index.php
<?php
declare(strict_types=1);
// Dentro de templates/<seu_template>/index.php
/** @var \Joomla\CMS\Document\HtmlDocument $this */
$param = (string) $this->params->get('paramName', 'defaultValue');
Works identically in parent and native child templates on Joomla 5 and 6.
templates/minimalista_webdev/index.php
<?php
$param = $this->params->get('paramName', 'defaultValue');
Classic Joomla 3 template parameter lookup.
Technical explanation and best practices
Inside a Joomla template or child template entry file (index.php, error.php, offline.php), $this->params exposes all fields defined in templateDetails.xml.