Difference between revisions of "Setting up a directory structure"

From Joomla! Documentation

m (Removed references to specific editors.)
(Updated contents)
Line 1: Line 1:
To make the most basic template, '''create a new folder''' in the ''"templates"'' folder. Name this folder after your template i.e. "mynewtemplate".
+
To make the most basic template, '''create a new folder''' in the <tt>''templates''</tt> folder. Name this folder after your template i.e. <tt>''mynewtemplate''</tt>.
  
Using a text editor '''create the files "index.php" and "templateDetails.xml"'''
+
Using a [[wikipedia:Text editor|text editor]] '''create the files <tt>index.php</tt> and <tt>templateDetails.xml</tt>'''.
  
To keep things organized, make '''2 new folders called "images" and "css"'''. Inside the "css" folder create a file called "template.css".
+
To keep things organized, make '''2 new folders called <tt>''images''</tt> and <tt>''css''</tt>'''. Inside the <tt>''css''</tt> folder create a file called <tt>template.css</tt>.
  
Although 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.
+
Although it is fine to place all your [[CSS]] code directly in your <tt>index.php</tt> 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 <code>link<code> tag. This may also shorten the loading time of your pages, since the separate file can be cached.
  
 
This is the most basic practical setup.
 
This is the most basic practical setup.
  
 
Outline of folder and file structure:
 
Outline of folder and file structure:
* '''mynewtemplate/'''
+
* <tt>'''''mynewtemplate/'''''</tt>
** <u>css/</u>
+
** <tt>''css/''</tt>
*** ''template.css''
+
*** <tt>template.css</tt>
** <u>images/</u>
+
** <tt>''images/''</tt>
** ''index.php''
+
** <tt>index.php</tt>
** ''component.php''
+
** <tt>templateDetails.xml</tt>
** ''templateDetails.xml''
 

Revision as of 09:34, 17 July 2011

To make the most basic template, create a new folder in the templates folder. Name this folder after your template i.e. mynewtemplate.

Using a text editor create the files index.php and templateDetails.xml.

To keep things organized, make 2 new folders called images and css. Inside the css folder create a file called template.css.

Although 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. This may also shorten the loading time of your pages, since the separate file can be cached.

This is the most basic practical setup.

Outline of folder and file structure:

  • mynewtemplate/
    • css/
      • template.css
    • images/
    • index.php
    • templateDetails.xml