Actions

J1.5

Difference between revisions of "Introduction to template parameters"

From Joomla! Documentation

m (JoomlaWikiBot moved page Introduction to template parameters to J1.5:Introduction to template parameters without leaving a redirect: moving to archived namespace)
m (archiving articles with category removal and addition)
 
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>
<noinclude>[[Category:Templates]][[Category:Parameters]]</noinclude>
+
<noinclude></noinclude>
 +
[[Category:Archived version Joomla! 1.5|{{PAGENAME}}]]

Latest revision as of 07:38, 30 April 2013

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: