Joomla - How to create template
I was trying to understand how to create own templates, but all I had is massive headache, it's so complicated, so I think that best way is to use existing template and to customize it. There is no guidelines on how to customize template. Three main files of the Joomla 1.5 template are index.php, /css/template.css and templateDetails.xml.
index.php determine main layout. template.css is used to define stylesheets. Stylesheets can be applied to the standard Joomla elements or to the custom defined elements/modules. To see element (module) position/name inside page layout, load page in your browser and View Source or invoke Joomla main page with ?tp=1 option (e.g. www.mysite.com/index.php?tp=1).
After you finish with your template, change templateDetails.xml to include all files that are needed for template deployment, because even if you zip whole template directory content, Joomla installation process will only install files that are declared inside this xml file.
With little knowledge of html, php and css you can reverse-engineer and customize any template in few hours/days, at least I did it.
I was able to redesign siteground-j15-84 template from SiteGround.com and to embed Nice Social BookMark module to appear at bottom of every article that had E-mail button icons enabled. Also I've changed position of the Print, Pdf and E-mail icon's from top-right to the bottom-right (see on my pages). Download my customized template Trumba Sundown.
To customize article layout's (re-arrange icons, move header, category descriptions, etc..) of single article:
1. Download and unzip Joomla installation on your local disk
2. In your main template directory create subfolder \html\com_content\article\
3. From joomla installation directory copy file components\com_content\views\article\tmpl\default.php to the \html\com_content\article\ subdirectory of your template
4. Edit default.php and change what ever you like (e.g. add some permanent footer that will be displayed on the bottom of every article):
at the end of the default.php search for </table> tag, before this tag insert your own html/php code or whatever you want. See my 'footer' code inside default.php (in bold):
<?php if ( intval($this->article->modified) !=0 && $this->params->get('show_modify_date')) : ?>
<tr>
<td class="modifydate">
<?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</td>
</tr>
<?php endif; ?>
<!-- Trumba addd-on: place pdf, email, print + nice_social_bookmarks bottom-right, if enabled any, if email icon is disable, all nice_social_bookmarks are also disabled -->
<?php if ($this->params->get('show_pdf_icon') || $this->params->get('show_print_icon') || $this->params->get('show_email_icon')): ?>
<tr>
<td>
<table width="100%" class="share_this_table">
<tr>
<td width="100%">
</td>
<?php if ($this->params->get('show_pdf_icon')) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHTML::_('icon.pdf', $this->article, $this->params, $this->access); ?>
</td>
<?php endif; ?>
<?php if ( $this->params->get( 'show_print_icon' )) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHTML::_('icon.print_popup', $this->article, $this->params, $this->access); ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_email_icon')) : ?>
<td align="right" width="100%" class="buttonheading"
<?php echo JHTML::_('icon.email', $this->article, $this->params, $this->access); ?>
</td>
<?php include $mainframe->getBasePath() ."templates/".$mainframe->getTemplate()."/social_bookmark.php"; ?>
<?php endif; ?>
</tr>
</table>
</td>
</tr>
<?php endif; ?>
<!-- end of part -->
</table>
<span class="article_separator"> </span>
<?php echo $this->article->event->afterDisplayContent; ?>
5. To change article appearance in the frontpage layout copy default_item.php from \components\com_content\views\frontpage\tmpl\ to the \html\com_content\frontpage\ subdirectory of your template. Change it and include it in your template.
6. To change article appearance in the category layout copy blog_item.php from \components\com_content\views\category\tmpl\ to the \html\com_content\category\ subdirectory of your template. Change it and include it in your template.
7. To change article appearance in the section layout copy blog_item.php from Joomla_1.5.15-Stable-Full_Package\components\com_content\views\section\tmpl\ to the \html\com_content\section\ subdirectory of your template. Change it and include it in your template.
5. After you made all changes, edit templateDetails.xml and declare every single file that is needed for template. Set descrption and author name.
6. Zip template directory with all files and try to install it from Joomla admin interface.
Resources
Joomla Template Tutorial at CompasDesign
Create basic template from Joomla.org
Official documentation about templates at Joomla.org
Try to create your own simple template using SiteGround tutorial on how to create basic 1.5 template
See list of all Joomla mini how to's from this site