Introduction to template parameters
From Joomla! Documentation
The "J1.5" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
To see an example of template parameters in action, go into Extensions → Template Manager and click on the rhuk_milkyway template. You will see, on the Template: [Edit] screen that there is a Parameters group containing a couple of fields called Colour Variation and Background Variation. See illustration below. These are typical template parameters and in this case they control the colour scheme of the template.
Template parameters allow the administrator to adjust the behaviour of a template using a form in the Administrator. What parameters are available and what they do is down to the template designer, but designers now have a set of easy-to-use tools for building flexibility into their templates. For the designer, this involves making changes to three elements:
- Adding a <param> element to the <params> section of the templateDetails.xml file. See Defining a parameter in templateDetails.xml.
- Adding a line to a params.ini file which will hold the current value of the parameter. See Storing parameter values.
- Adding code to the template PHP file to retrieve the current value of the parameter and act on it. See Retrieving parameter data in a template file.