One of the reasons that using Joomla makes it easy to create a website is the availability of templates that take care of all of the background stuff, so you can concentrate on the content. There is undoubtedly a consideration here, that any template you use will be someone else’s – and may not be quite what you are looking for when it comes to making your website yours. If you are fairly confident with coding, you can create your own templates and use Joomla the same way you do for content – as a management system which keeps everything in one place.
To create a (very) basic template for Joomla, you simply need to have an FTP client – or know how to use the File Manager of your cPanel – and the basic template files that make up every Joomla template. These files are:
Index.php– this creates the main body of your template, positions and a path to your stylesheet.TemplateDetails.xml– this is the file that the Joomla software needs to read the information in your templateCss/template.css– this is the stylesheet itself. That means it carries all of the information that decides what your website looks like.
There are three basic templates that come with the Joomla application, and to see what the above files look like you can open any of the template files and familiarize yourself with the content of the files. There is a lot of detail in each of these and to list it all here would take up too much space, but if you are familiar with HTML code it will be recognizable to you.
In the index.php file, you will include any code which specifies the position of content – whether that be page titles, meta descriptions and tags, and so forth. It is this file that will govern the layout of your website.
In the templateDetails.xml file, a lot of information is required so that Joomla knows what to show. You can write this code yourself, or base it around the already-existing code for the templates that came with the software. The information in this file will tell Joomla which version of the software the template has been written for, what it is called, who created it and when, as well as a great deal of other information. This is where the licensing information is kept.
The final file that you need to edit is the CSS file. CSS stands for Cascading Style Sheet and is responsible for the colors, fonts and graphics used on your site. When you are editing the index file you will need to place a line of text pointing to the CSS file, so that your website knows where to load the stylesheet file from.
There are many guides on the Internet which will inform you on how to edit the specific information in the three separate files, and it is worth familiarizing yourself with these guides before you attempt to create any intricate template for Joomla. To begin with, it is worth simply playing with the code to see what kind of changes are possible.
Recent Comments