下面是我的Ja_purity的 templateDetails.xml文件。
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="template">
<name>JA_Purity</name>
<version>1.1.3</version>
<creationDate>12/26/07</creationDate>
<author>JoomlArt.com</author>
<authorEmail>
为防备电子邮件地址收集器,这个 E-mail 地址被隐藏,你的浏览器必须支持 Javascript 才可看到这个邮件地址
</authorEmail>
<authorUrl>http://www.joomlart.com</authorUrl>
<copyright></copyright>
<license>GNU/GPL version 2</license>
<description>JA PURITY DESCRIPTION</description>
<files>
<filename>component.php</filename>
<filename>css/index.html</filename>
</files>
<images>
<filename>images/arrow.png</filename>
</images>
<css>
<filename>css/menu.css</filename>
</css>
<languages>
<language tag="en-GB">en-GB.tpl_ja_purity.ini</language>
</languages>
<administration>
<languages>
<language tag="en-GB">admin/en-GB.tpl_ja_purity.ini</language>
</languages>
</administration>
<positions>
<position>hornav</position>
<position>breadcrumbs</position>
<position>banner</position>
</positions>
<params>
<param type="spacer" default="<B>Template Logo</B>" />
</params>
</install>
每个模板相应目录下面都有一个templateDetails.xml配置文件,这个文件包含这个模板的重要信息。这文件主要包含几个重要的部分
<files> 部分包含模板涉及到的重要文档
<images> 部分包含涉及到的图片文件
<css> 部分是css文件
<languages> 不用说是语言文件
<positions> 定义了模板中的模块位置
<params> 模板中的参数
从以上可以看到,模块定义需要在模板配置文件中<positions>增加相应的位置,来看看我的Ja_purity模板的模块位置定义:
<positions>
<position>hornav</position>
<position>breadcrumbs</position>
<position>banner</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>user5</position>
<position>footer</position>
<position>syndicate</position>
<position>debug</position>
</positions>
只有在配置文件中定义以后,在后台管理界面中才能可以将模块设置在相应的位置上。