Installing Joomla is well documented, and surprisingly easy to install (at least on my good old macbook pro). Once installed, I think most people are wondering how on earth do I create a theme. I sure did, so i dug around and started picking a theme apart to figure out how to do this.
“Installing” a new theme is as simple as copying an existing theme to another folder. I shamelessly started with… well.. now I forgot, but never mind.
Pick an existing template, copy the entire folder and name it “Prescienta” (that’s what I did).
Locate the index.php file, and make a copy of it too (let’s call it _index.php since underscores make you seem clever!
If you go to the management console, and pick Extensions/Template Manager, you’ll see two templates with the SAME NAME (aaargh). The devil is in the details as they say, so lets go back to the template dir, and find the file called “templateDetails.xml”. In that file you will find a bunch of things that you can edit. Some of them are pretty obvious (like the name of the template, the author and so on), but others offer some nifty functionality.
In the templateDetails.xml file, locate the section called <params>
Let’s add a new parameter to control the background color.
<param name="backgroundOption" type="list" default="white" label="Background Color" description="Background color to use">
If you save the files, go back to the template manager, and pick your new template, you will see the new option that you just added.
Fantastic, but how do I use this? If you go back to your index.php and open it in your favorite editor (I use Coda), you can add the following code.
<div style="background-color:<?php echo $this->params->get('backgroundOption'); ?>">Wow - my new param</div>
And that, my friend, concludes part one of the Joomla template tutorial