Documentation

Manifests

Overview

All templates should include a manifest in the form of an XML document named templateDetails.xml. The file holds key "metadata" about the template and is essential. Without it, your template won't be seen by Joomla!.

Directory & Files

Manifests are stored in the same directory as the template file itself and must be named templateDetails.xml.

/hubzero
  /templates
    /{TemplateName}
      /css
      /html
      /images
      /js
      error.php
      index.php
      templateDetails.xml
      template_thumbnail.png
      favicon.ico

Structure

This XML file just lines out basic information about the template such as the owner, version, etc. for identification by the Joomla! installer and then provides optional parameters which may be set in the Template Manager and accessed from within the module's logic to fine tune its behavior. Additionally, this file tells the installer which files should be copied and installed.

A typical template manifest:

<?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>2008-05-01</creationDate>
	<author>John Doe</author>
	<authorEmail>john@example.com</authorEmail>
	<authorUrl>http://www.example.com</authorUrl>
	<copyright>John Doe 2008</copyright>
	<license>GNU/GPL</license>
	<version>1.0.2</version>
	<description>My New Template</description>
	<files>
		<filename>index.php</filename>
		<filename>component.php</filename>
		<filename>templateDetails.xml</filename>
		<filename>template_thumbnail.png</filename>
		<filename>images/background.png</filename>
		<filename>css/style.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>

Let's go through some of the most important tags:

INSTALL
The install tag has several key attributes. The type must be "template".
NAME
You can name the templates in any way you wish.
FILES
The files tag includes all of the files that will will be installed with the template.
POSITIONS
The module positions used in the template.

The one noticeable difference between this template manifest and the typical manifest of a module or component is the lack of params. While templates may have their own params for further configuration via the administrative back-end, they aren't as commonly found as in other extension manifests. Most HUBzero templates do not include them.

See Joomla!'s Documentation on the full list of available parameter types and what they do.

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®