Difference between revisions of "What is the purpose of the templateDetails.xml file?"

From Joomla! Documentation

m (removed Category:Template FAQ using HotCat)
Line 114: Line 114:
<noinclude> [[Category:Topics]]
<noinclude> [[Category:Topics]]
[[Category:Template FAQ]]
[[Category:Template Development]]
[[Category:Template Development]]
[[Category:Template Development FAQ]]
[[Category:Template Development FAQ]]

Revision as of 23:26, 21 June 2013

The templateDetails.xml file holds a variety of meta-data used by the Template Manager in installation and maintenance. It is helpful to recognize the different sections of the file. Typically, each section of data is indented to make the file more readable, but this indentation is not necessary.

Basic Details

The initial display of the Template Manager shows a list of available templates and basic details relating to the template. Each of these bits of information is gathered from the templateDetails.xml file.

Template details basic.png

<install version="1.5" type="template">
    <author>Andy Miller</author>

File Structure

All files related to the template are listed. Each filename contains full path information starting at the template root. The Administrator's Installer uses this information when storing the files during installation.

A small portion of the files listed in the rhuk_milkyway template is given below.


Optional and highly recommended file structure --



Some templates may include language files to allow translation of static text in the template. Notice that two language files are shown below. The first holds the language file for text that will be viewed by the User. The second, placed within <administration> tags, is for text that will be viewed by the Administrator.

	<language tag="en-GB">en-GB.tpl_beez.ini</language>
	<languages folder="admin">
	    <language tag="en-GB">en-GB.tpl_beez.ini</language>

Module Positions

The available Module Positions that can be used in the template are defined.



A template may offer display options that can be chosen by the Administrator in the Template Manager. For instance, the rhuk_milkyway template allows the Administrator to change the border colors, change the background color, and define the display width.

Template details params.png

An example of adding a parameter and its values is shown below.

	<param name="colorVariation" type="list" default="white" label="Color Variation" description="Color variation to use">
	    <option value="blue">Blue</option>
	    <option value="red">Red</option>
	    <option value="green">Green</option>
	    <option value="orange">Orange</option>
	    <option value="black">Black</option>
	    <option value="white">White</option>

For more information about working with Parameters, see:

Defining a parameter in templateDetails.xml
Retrieving parameter data in a template file