Creating a basic templateDetails.xml file: Difference between revisions
From Joomla! Documentation
mNo edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
The templatedetails.xml file is essential. Without it, your template won't be seen by Joomla!. The file holds key "metadata" about the template. | |||
Lets look at an example: | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://dev.joomla.org/xml/1.5/template-install.dtd"> | |||
<install version="1.5" type="template"> | |||
<name>mynewtemplate</name> | |||
<creationDate>1/5/08</creationDate> | |||
<author>Joe Bloggs</author> | |||
<authorEmail>Joe@bloggs.com</authorEmail> | |||
<authorUrl>http://www.joebloggs.com</authorUrl> | |||
<copyright>joe bloggs 2008</copyright> | |||
<license>GNU/GPL</license> | |||
<version>1.0.2</version> | |||
<description>My New Template</description> | |||
<files> | |||
<filename>index.php</filename> | |||
<filename>templateDetails.xml</filename> | |||
<filename>template_thumbnail.png</filename> | |||
<filename>images/background.png</filename> | |||
<filename>css/css.css</filename> | |||
</files> | |||
<positions> | |||
<position>breadcrumb</position> | |||
<position>left</position> | |||
<position>right</position> | |||
<position>top</position> | |||
<position>user1</position> | |||
<position>user2</position> | |||
<position>user3</position> | |||
<position>user4</position> | |||
<position>footer</position> | |||
</positions> | |||
</install> | |||
So, as you can see, we have a set of information between markup tags ( the <thing> ). Your best approach is to cut and paste this into your "templatedetail.xml" file and change the relevant bits (such as <template name> <author> ). | |||
The <files> part should contain all the files that you use - you possibly don't know what they are called yet - don't worry do it later | |||
Leave the positions as they are - these are a common set so you will be able to switch easily from the standard templates. | |||
Revision as of 12:43, 2 May 2008
The templatedetails.xml file is essential. Without it, your template won't be seen by Joomla!. The file holds key "metadata" about the template.
Lets look at an example:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://dev.joomla.org/xml/1.5/template-install.dtd"> <install version="1.5" type="template"> <name>mynewtemplate</name> <creationDate>1/5/08</creationDate> <author>Joe Bloggs</author> <authorEmail>Joe@bloggs.com</authorEmail> <authorUrl>http://www.joebloggs.com</authorUrl> <copyright>joe bloggs 2008</copyright> <license>GNU/GPL</license> <version>1.0.2</version> <description>My New Template</description> <files> <filename>index.php</filename> <filename>templateDetails.xml</filename> <filename>template_thumbnail.png</filename> <filename>images/background.png</filename> <filename>css/css.css</filename> </files> <positions> <position>breadcrumb</position> <position>left</position> <position>right</position> <position>top</position> <position>user1</position> <position>user2</position> <position>user3</position> <position>user4</position> <position>footer</position> </positions>
</install>
So, as you can see, we have a set of information between markup tags ( the <thing> ). Your best approach is to cut and paste this into your "templatedetail.xml" file and change the relevant bits (such as <template name> <author> ).
The <files> part should contain all the files that you use - you possibly don't know what they are called yet - don't worry do it later
Leave the positions as they are - these are a common set so you will be able to switch easily from the standard templates.