---
title: "How to create custom template in Joomla"  
description: "Joomla provides many default templates to apply in your website, but if you want to create your own template, you have to follow these two steps."  
author: "Anonymous User"  
published: 2012-03-05  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/886/how-to-create-custom-template-in-joomla  
category: "joomla"  
tags: ["joomla"]  
reading_time: 2 minutes  

---

# How to create custom template in Joomla

Joomla provides many default [templates](https://www.mindstick.com/interview/34049/what-are-templates-in-knockout-js) to apply in [your website](https://yourviews.mindstick.com/view/81591/semrush-tutorial-and-review-2020-how-to-use-it-to-20x-your-website-traffic), but if you want to create your own [template](https://www.mindstick.com/blog/282/creating-custom-template-in-joomla), you have to follow these two steps.\

1. Create your own templates file

2. Upload zip file of template file

##### Step1: Create your template file:

To create your template file, first of all you have to create two file: **‘index.php’** and **‘templateDetails.xml’.**

##### ‘index.php’ File:

**‘index.php’** files are those file where the entire markup goes in which you stick the Joomla includes. These can be seen as little hooks where joomla hangs up information on, like [modules](https://www.mindstick.com/interview/266/what-is-the-use-of-http-modules) for example.

##### ‘templateDetails.xml’:

**‘templateDetails.xml’** files are those file where you can see template details as a list of instructions to Joomla. This list must include the name of the template, the names of the files used in the template (images etc.) and the positions you want to use in your website.

Now let’s take a look on these two file that how it’s created through the code.

##### ‘index.php’ code:

```
 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo
$this->language; ?>" lang="<?php echo $this->language;
?>" > <head>    <jdoc:include type="head" /> </head>  <body>  <jdoc:include type="component" /> <jdoc:include type="modules" name="left" /> <jdoc:include type="modules" name="footer" /> </body> </html> 
```

##### ‘templateDetails.xml’ Code:

```
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE install PUBLIC "-//Joomla! 1.7//DTD template 1.0//EN"
"http://dev.joomla.org/xml/1.5/template-install.dtd"> <install version="1.7" type="template">        <name>MyTemplate</name>        <creationDate>26-01-2012</creationDate>        <author>Arun Kumar Singh</author>         <authorEmail>myusername@domain.com</authorEmail>         <authorUrl>http://mindstick.com</authorUrl>         <copyright>mindstick 2010</copyright>         <license>GNU/GPL</license>         <version>1.0.0</version>         <description>My
Template</description>         <files>                 <filename>index.php</filename>                 <filename>templateDetails.xml</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> 
```

Now save these files into a [directory](https://www.mindstick.com/forum/226/how-to-get-application-directory-using-c-sharp-csharp), here I am taking a [temporary](https://www.mindstick.com/forum/2292/how-to-set-temporary-path-of-jdk-in-windows) directory **‘MyTemplate’** within which I have store these files and make its zip file.

Step 2: Upload zip file of template file

To upload this file in joomla, first of all login in Joomla Administrator Panel and go to **[Extensions](https://www.mindstick.com/articles/12362/is-ajax-cart-extensions-necessary-for-e-commerce-websites) -> [Extension](https://www.mindstick.com/articles/22/extension-method) [Manager](https://yourviews.mindstick.com/view/84130/content-manager-duties-and-responsibilities).**

![How to create custom template in Joomla](https://www.mindstick.com/mindstickarticle/9d8fe61d-91bf-4e24-bb63-a573ba8f7303/images/84787421-f46f-411c-b315-b2125b512a3b.png)

Now click on **‘Browse’** button and then click on **‘Upload & Install’**.

![How to create custom template in Joomla](https://www.mindstick.com/mindstickarticle/9d8fe61d-91bf-4e24-bb63-a573ba8f7303/images/1886bd5b-1005-4dd1-917b-c7b6da25701e.png)

![How to create custom template in Joomla](https://www.mindstick.com/mindstickarticle/9d8fe61d-91bf-4e24-bb63-a573ba8f7303/images/ae71ae9f-d4a0-469a-a9fe-d1fde7b13aef.png)

Now go to Extensions -> Template Manager, select your template name from template list and set it default by clicking **‘Make Default’** button.

![How to create custom template in Joomla](https://www.mindstick.com/mindstickarticle/9d8fe61d-91bf-4e24-bb63-a573ba8f7303/images/97eaeaf0-867a-43fd-aad0-598283cf0ffe.png)

To see the output click on ‘View Site’ link this is at top right corner of panel.

![How to create custom template in Joomla](https://www.mindstick.com/mindstickarticle/9d8fe61d-91bf-4e24-bb63-a573ba8f7303/images/d0ea25be-9819-46ab-aec6-e1167f6ca426.png)

\

---

Original Source: https://www.mindstick.com/articles/886/how-to-create-custom-template-in-joomla

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
