Actions

User

Difference between revisions of "Rvsjoen/tutorial/Developing a Template/Part 05"

From Joomla! Documentation

< User:Rvsjoen‎ | tutorial/Developing a Template
m (Created page with "= Adding parameters = With your favorite editor, edit the following file <span id="templateDetails.xml"> '''<tt>templateDetails.xml</tt>''' <source lang="xml"> <?xml version="1...")
 
(Adding parameters)
Line 28: Line 28:
 
<position>left</position>
 
<position>left</position>
 
</positions>
 
</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" />
 +
</fieldset>
 +
</config>
 
</extension>
 
</extension>
 
</source>
 
</source>

Revision as of 05:43, 16 April 2012

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" />
                        </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