Params
New to Joomla 1.5.X are what are called "template parameters". The word parameters is used everywhere in Joomla but just think of it as an attribute like most of us have hair some blonde some black. If we where computer program we could set our hair color parameter to change color from blonde to black or whatever color to another or both. The "template parameter" would be "Hair" it's attribute's would be color types etc.
Template Parameters are made up of three files and its best explain from the "rhuk_milkyway" default template. The template uses three list parameters to to change the color links the background and the templates body width.
index.php The main template file it has the param code inside. You can have as many params assigned in a template as you like.
Param code looks like this.

param.ini Stores the main default variable name and default value. Can hold more then one variable value at a time.
Param code looks like this in the param.ini file.

This file can have more then one param variable name and value. colorVariation is the param variable name the equal sign assigns the default value to the param variable. only one param variable and value per line to add more values to a param variable it needs to be done via the templateDetails.xml file.
templateDetails.xml Stores the param type and meta data for the param type. This file stores more values but also the way that you see the control in the template manager.
 Code for the above color Variation pull down.

Each param variable needs to be added to the templateDetails.xml inside the <params></params> code block. There many types on meta data and form controls that can be used.
The three most used param controls are list , text , text area. Most of the param's in the templateDetails.xml file have parameters themselves.
name: the name of the param variable type: the type of form control example list, text, text area etc. default: the default value for the param. label: the name that appears in the template manager for the param. description: a description of what it does.
There are a ton of controls that one can use. To see all the available types click on the link below. http://docs.joomla.org/Using_the_core_parameter_types#Text
If you open the "rhuk_milkyway" Joomla 1.5.X template in a text editor you can find first the two lines in the head section other in the body tag. These controls are controlled in the template manager you can see them in the image cut out.
 colorVariation Controls CSS file used for the link colors etc.

backgroundVariation Controls CSS file used for the link background used etc.

witdhStyle Controls width and above mention items etc.

Please note: That at this time the Joomla Template Kit 3.0 does not add the variables names to Param.ini file or controls and values to the templateDetails.xml file.
Dreamweaver by default does not open ini text files. The XML wizard will overwrite any params added. Params most be added by hand when your template is ready to go live and you have done your last template xml update with our XML Wizard.
|