Actions

User

Rvsjoen/tutorial/Developing a Template/Part 05

From Joomla! Documentation

< User:Rvsjoen‎ | tutorial/Developing a Template
Revision as of 06:48, 16 April 2012 by Rvsjoen (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Contents

Adding parameters

With your favorite editor, edit the following file

templateDetails.xml

<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="template" client="site">
        <name>TPL_HELLOWORLD</name>
        <creationDate>Once upon a time</creationDate>
        <author>John Doe</author>
        <authorEmail>john.doe@example.org</authorEmail>
        <authorUrl>http://www.example.org</authorUrl>
        <copyright>Copyright Info</copyright>
        <license>License Info</license>
        <version>0.0.1</version>
        <description>TPL_HELLOWORLD_XML_DESCRIPTION</description>
        <files>
                <filename>index.php</filename>
                <filename>templateDetails.xml</filename>
                <folder>css</folder>
                <folder>language</folder>
        </files>
        <positions>
                <position>header</position>
                <position>footer</position>
                <position>left</position>
        </positions>
        <config>
                <fields name="param">
                        <fieldset name="advanced">
                                <field 
                                        name="backgroundcolor" 
                                        type="text" 
                                        default="" 
                                        label="TPL_HELLOWORLD_FIELD_BACKGROUNDCOLOR_LABEL" 
                                        description="TPL_HELLOWORLD_FIELD_BACKGROUNDCOLOR_DESC" />
                                <field name="templatewidth" type="list"
                                        label="TPL_HELLOWORLD_FIELD_WIDTH_LABEL"
                                        description="TPL_HELLOWORLD_FIELD_WIDTH_LABEL" >
                                        <option value="fixed">TPL_HELLOWORLD_WIDTH_FIXED</option>
                                        <option value="fluid">TPL_HELLOWORLD_WIDTH_FLUID</option>
                                </field>
                        </fieldset>
        </config>
</extension>

File listing

Testing your template

For details on how to install the template into your Joomla! site, refer to the information provided in Part 01.

Download this part

Articles in this series

This tutorial is supported by the following versions of Joomla!

Joomla 2.5