How to Create Template and Assign Different Templates for Pages

Standard Joomla set includes several templates which are located within ../template folder in the root of your site. You can use any of them (except /system).
You can easy create a new template:
- Create a new folder within ../template folder;
- Add to this folder templatedetails.xml and index.php files
Templatedetailes.xml file is a description of a new template. It contains two required sections. The first one includes general information about your template such as name, date of creation, information about template author, etc.:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE install (View Source for full doctype…)>
- <install version="x.x" type="template" client="site">
<name>TemplateName</name>
<creationDate>MM/DD/YY</creationDate>
<author>AuthorName</author>
<authorEmail>author@email.com </authorEmail>
<authorUrl>http://www.authorUrl.com</authorUrl>
<copyright />
<license>GNU/GPL</license>
<version>x.x.x</version>
<description>description</description>
The second one describes position of modules on the page, for example:
- <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>
<position>debug</position>
<position>syndicate</position>
</positions>
If you have any problems with creating this file, you can always apply to templatedetails.xml of any existing Joomla template.
This would be the simplest template. For more difficult template you will need to create folders with css, javascripts, images and html pages.
Index.php is a file with standard html page layout. If you wish to insert some Joomla module into your template, paste the following string to index.php:
<jdoc:include type="modules" name="modulename" style="rounded" />
where modulename is a name of the module to be inserted.
Settings default template for site
Now let select the default template for your site:
- Go to Extensions -> Template Manager;
- Select a template from the list and click Default button at the top of the page.
The selected template will be immediately starred in the Default column of the list. From now, your site will use this template for pages appearance.
Assigning another template for individual site page(s)
While you have already set the default template for your site, you may wish to show some page in other manner. Joomla allows you to do so assigning some other template for individual page(s):
- Go to Extensions -> Template Manager;
- Click to the name of a template which will be assigned to a page;
- Within Menu Assignment area, select page (or pages) the template will be assigned to.
- Click Save.
The assigned template will be marked with check in Assigned column of the templates list. And the selected page(s) will be displayed using the assigned template.