Actions

J1.5

Difference between revisions of "Introduction to template parameters"

From Joomla! Documentation

(New page: 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]''' ...)
 
m (Added categorisation.)
Line 8: Line 8:
 
* Adding a line to a ''params.ini'' file which will hold the current value of the parameter.  <noinclude>See [[Storing parameter values]].</noinclude>
 
* Adding a line to a ''params.ini'' file which will hold the current value of the parameter.  <noinclude>See [[Storing parameter values]].</noinclude>
 
* Adding code to the template PHP file to retrieve the current value of the parameter and act on it.  <noinclude>See [[Retrieving parameter data in a template file]].</noinclude>
 
* Adding code to the template PHP file to retrieve the current value of the parameter and act on it.  <noinclude>See [[Retrieving parameter data in a template file]].</noinclude>
[[Category:Templates]]
+
<noinclude>[[Category:Templates]][[Category:Parameters]]</noinclude>

Revision as of 17:05, 1 July 2009

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

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.png

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: