Actions

Difference between revisions of "What is the typical template directory structure?"

From Joomla! Documentation

Line 1: Line 1:
A typical template for Joomla! 1.5 will include the following directories:
+
===Typical Template Directory Structure===
: {{:Typical template directory structure}}<noinclude>[[Category:Templates]][[Category:Definition lists]][[Category:Beginners]]</noinclude>
+
It is most common for a template to have at least four files:
 +
* index.php
 +
: Provides the logic for the display and positioning of modules and components.
 +
* template.css
 +
: Handles the presentational aspects of the template including specifications for margins, fonts, headings, image borders, list formatting, etc.
 +
* templateDetails.xml
 +
: Holds meta-information related to the template and used by the Installer and the Template Manager.
 +
* template_thumbnail.ext - replace .ext with the extension format of the image (.jpg, .png, .gif)
 +
: Generally a 200x150 pixel image that is shown when the cursor is held over the template name in the Template Manager.  This gives the Administrator a snapshot view of the template before applying it to the Site.
 +
 
 +
 
 +
{{:Typical template directory structure}}
 +
 
 +
<noinclude>[[Category:Templates]][[Category:Definition lists]][[Category:Beginners]]</noinclude>

Revision as of 17:33, 19 February 2008

Typical Template Directory Structure

It is most common for a template to have at least four files:

  • index.php
Provides the logic for the display and positioning of modules and components.
  • template.css
Handles the presentational aspects of the template including specifications for margins, fonts, headings, image borders, list formatting, etc.
  • templateDetails.xml
Holds meta-information related to the template and used by the Installer and the Template Manager.
  • template_thumbnail.ext - replace .ext with the extension format of the image (.jpg, .png, .gif)
Generally a 200x150 pixel image that is shown when the cursor is held over the template name in the Template Manager. This gives the Administrator a snapshot view of the template before applying it to the Site.


<translate> A typical template for Joomla! will include the following directories:

  • css - contains all the .css files
  • html - contains template override files for core output and module chrome
  • images - contains all images used by the template
  • language - contains additional language files used by the template</translate>

<translate> Depending on the complexity and design of the template is may also contain:

  • javascript - contains supporting JavaScript used by the template for added functionality</translate>

<translate>====Example structure with files==== </translate> <translate> Typical path of a template is <root>/public_html/domain-name/template/<name of your template> which will contain the following directories and files based on your template.</translate>

/css
/html
/images
/javascript
/language
component.php
error.php
favicon.ico
index.php
templateDetails.xml
template_preview.png
template_thumbnail.png