

This page will show the bare-bones code ready for you to cut and paste into your own design.Ī Joomla template begins with the following lines: Anything added to the template will appear on all pages unless it is added to one of these sections via the Joomla CMS (or customised code). The template works by adding Joomla code into module positions and the component section in your template. Essentially, you make a page (like any HTML page) but place PHP code where the content of your site should go. The index.php file becomes the core of every page that Joomla! delivers. These are a common set so you will be able to switch easily from the standard templates. The element can be used to define an entire folder at once. You might not know what they are called yet. The part should contain all the files that you use. Your best approach is to copy and paste this into your templateDetails.xml file and change the relevant bits (such as and ).

So, as you can see, we have a set of information between markup tags (the s). Change version="2.5" into the version of your Joomla! installation. The syntax of the file is different for each Joomla version.įor and later, use the following version. The file holds key metadata about the template. Without it, your template won't be seen by Joomla!. The templateDetails.xml file is essential. Outline of folder and file structure:Ĭreating a Basic templateDetails.xml file This will reduce the loading time of your pages, since the separate file can be cached. Inside the css folder, create a file called template.css.Īlthough it is fine to place all your CSS code directly in your index.php file to start, many web developers prefer to place their CSS code in a separate file that can be linked from multiple pages using the link tag. To keep things organized, make 2 new folders called images and css. Using a text editor create the files index.php and templateDetails.xml. Name this folder after your template, i.e. To make the most basic template, create a new folder in the templates folder. The code is presented so it can be copy and pasted with very little modification needed. It will cover the essential files and code needed to create a basic template.

This tutorial is an introduction to creating Joomla! templates.
#THEMPLATE JOOMLA INSTALL#
For simple sites these out-of-the-box templates may be appropriate, but many Joomla users will opt to install a third party template to suit the purpose of their site. Out of the box Joomla 3.x ships with two Frontend templates, Protostar (which is set as default), and Beez3.

Most of the templates you use or install will be Frontend Templates. There are two types of templates used in a Joomla-powered website.įrontend templates change the way your site looks to visitors.
