ThemePartner, Professional Joomla! Business Templates

Theo

Joomla 1.6 vs Joomla 1.5: templateDetails.xml

November 25th, 2010 at 5:00 PM CET in Joomla 1.6

With Joomla 1.6 having reached beta 14, the first release candidate (RC) shouldn't take long. In order to install Joomla templates on Joomla 1.6, several changes need to be made to the templateDetails.xml file that is packed with a template. Based on the information found in several sources (including the templates that are currently shipped with Joomla 1.6), I created a step-by-step comparison of the changes that need to be made to templateDetails.xml file for it to be compatible with Joomla 1.6.

Photo credits: Jared Tarbel

DOCTYPE declaration (DTD)

Joomla 1.6 let's you specify a specific DOCTYPE for your templateDetails.xml file. At the time of writing, the website to which the DTD links (http://www.joomla.org/xml/dtd/1.6/template-install.dtd) cannot be found, so I can't analyze the contents of that file any further.

Joomla 1.5

<?xml version="1.0" encoding="utf-8"?>

Joomla 1.6

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd">

Install vs. Extension

The <install> element is deprecated in Joomla 1.6, which means it will not be available anymore in the next version of Joomla. Using the method="upgrade" setting will let your users install an updated version of the extension, without having to uninstall the previous version first. Several articles on the templateDetails.xml file use client="site" in the extension element as well. I'm unable to find any documentation on the web discussing this setting and therefor didn't include it in my example. If anyone knows any details on this setting, please explain it in the comments.

Joomla 1.5

<install version="1.5" type="template">
...
</install>

Joomla 1.6

<extension version="1.6" type="template" method="upgrade">
...
</extension>

Languages

As mentioned by the guys over at ProThemer (and showing in the templates shipped with Joomla 1.6), there is no need to specify different language files for the website and the administrator anymore. Replace [ln-LN] with the locale of your choice. Locales are build as language-COUNTRY. Several examples for valid locales: en-US, nl-NL, fr-FR, it-IT, de-DE, nl-BE etc. The brackets [ and ] are for illustrative purposes and shouldn't be included in the templateDetails.xml file.

Joomla 1.5

<languages>
 <language tag="[ln-LN]">[ln-LN].tpl_[template_name].ini</language>
</languages>
<administration>
 <languages>
  <language tag="[ln-LN]">admin/[ln-LN].tpl_[template_name].ini</language>
 </languages>
</administration>

Joomla 1.6

<languages>
 <language tag="[ln-LN]">[ln-LN].tpl_[template_name].ini</language>
</languages>

Params / param vs. Config / fields / fieldset / field

With Joomla 1.5 you're limited in the core support for adding parameters to your templates. For example: without any outside code it isn't possible to have several different panels (that can expand and collapse on click) on the right side of your administrator. Unfortunately the name specified in the fieldset element doesn't seem to be displayed correct directly in the administrator. When I enter the name 'foobar' it displays 'COM_TEMPLATES_foobar_FIELDSET_LABEL' in the panel header instead. Adding the string to several different translation files didn't resolve that issue for me. Does anyone know a good fix for this?

Joomla 1.5

<params>
 <param></param>
</params>

Joomla 1.6

<config>
 <fields name="params">
  <fieldset name="basic">
   <field></field>
  </fieldset>
  <fieldset name="foobar">
   <field></field>
  </fieldset>
 </fields>
</config>

If I missed any vital changes to the templateDetails.xml file, or made any errors, feel free to post a comment below!

Follow us on Twitter

User Comments (10)

Add comment

Hussain

December 2nd, 2010 at 5:29 PM CET
Indeed your explanation resolved my troubles, thank you so much...

Theo

December 2nd, 2010 at 5:44 PM CET
You're welcome Hussain, I'm glad we could resolve your troubles!

donpool

January 20th, 2011 at 10:38 PM CET
Nice! but what about this:

<params addpath="/templates/template_name/elements">

Wich 1.6 tag (Config / fields / fieldset / field) should contain this addpath argument if any ?

Regards

Theo

January 21st, 2011 at 10:23 AM CET
The addpath attribute can be added to the fields tag, as shown below:

<fields name="params" addfieldpath="/templates/template_name/elements">

Gunnar

May 18th, 2011 at 8:35 PM CEST
I'm new in Joomla! and I have to make a template and this post help me Thanks!!!

TopHTML

August 11th, 2011 at 6:32 AM CEST
I'm studying about it now, and I found this article very useful for me. Thanks so much

Bill

October 20th, 2011 at 10:36 PM CEST
Thanks for the post, great info. I'm having some problems changing the meta data on Joomla. Any advice or help? The meta data fields are filled in, but the original page source isn't changing. Any feedback would be great, thanks.

Rehne

February 14th, 2012 at 12:57 PM CET
solution:
<fieldset name="foobar" label="TPL_NDK_FOOBAR_FIELDSET_LABEL">
...

translate TPL_NDK_FOOBAR_FIELDSET_LABEL in your template-language-file
TPL_NDK_FOOBAR_FIELDSET_LABEL="Foobar"

thats all ...


for your question:
"When I enter the name 'foobar' it displays 'COM_TEMPLATES_foobar_FIELDSET_LABEL' in the panel header instead. Adding the string to several different translation files didn't resolve that issue for me. Does anyone know a good fix for this?"

Guy Vermeulen

March 14th, 2012 at 6:33 PM CET
Regarding the setting client="site". This sets the template as a site template or an administrator template (in other words; front end or back end template).

To set it as a back end template, type client="administrator"

From the joomla wiki; "Notice the additional new client attribute which is set to site for a front-facing template and administrator for an back-end template."

web design forum

March 30th, 2012 at 3:27 AM CEST
Hi,
I have a event management web site. I am using 1.5 version of joomla. when i tried to upgrade to 1.6 the template is not working. I tried in your way but nothing is working.
Now can you give me a good event management template link for 1.6?
I have to rebuild the whole site at 1.6.
Please share me a good template for event management.

Add a comment

*
*
*

*

 

Buy 2 Templates, Get Your Third Free!

Buy 2 Templates, Get Your Third Free!

By popular demand we've introduced a way to purchase multiple templates, at a discounted rate! If you add any three templates to your shopping cart, you'll only have to pay for two!

Blog categories

Conferences

Upcoming conferences

Past conferences

Reports on past conferences