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.

Updated on 24 November 2026 23 copies 106 views
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.

Direct Engineering

Have a Joomla project or technical challenge in mind?

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