![]() The folder location is optional, but you have to specify where it is in the index.php file. After the template has been installed, this functions as a preview image that is visible in the Joomla administration Template Manager and also the template selector module in the frontend (if used). Core Files Needed for a CSS-Based TemplateĪ web browser screenshot of the template (usually reduced to around 140 pixels wide by 90 pixels high). Table 9.1 lists the files commonly found in a template. It is conventional (although not required by the Joomla core) to name and locate them as shown here: /element/template_thumbnail.png It is a combination of PHP and HTML/XHTML.Īlmost all templates use additional files. It lays out the site and tells the Joomla CMS where to put the different components and modules. This file is the most important in a Joomla template. The second key file is the primary template file that generates pages, index.php. The last use of this file is for unpacking and installing a template when using the extension installer in the administrative backend. (Note the uppercase D.) It also details the author, copyright, and what files make up the template (including any images used). This is an XML-format metadata file that tells Joomla what other files are needed when it loads a web page that uses this template. The first of these is the template XML file: templateDetails.xml. These filenames and locations must match exactly because this is how they are called by the Joomla core script. Within the directory of a template, there are two key files: /element/templateDetails.xml These names are case-sensitive and shouldn't contain spaces. Note that the directory name for a template must be the same as the name of the template-in this case, element and voodoo. If you had two templates installed called Element and Voodoo, your directory would look something like this: /templates/element These files must be placed in the /templates/ directory of a Joomla installation, each in a folder designated for that template. A template needs to contain various files and folders. When constructing your own templates, you need to set up several files and folders in a coordinated manner. Normally, you would install the template using the Joomla installer, which takes care of all these steps. This section reviews the manual process of setting up template files. You can also follow along by installing these four templates in your localhost, in which case you'll be able to see your edits and tests live on the frontend. Download the sample template that matches the section you are reading, and you can follow along. Instead, you can refer to the supplied templates from There are four templates, each of which corresponds to the stage of its development at the end of the related section in this chapter. This process is time-consuming and prone to error. You can start with new files and type in the code shown here to slowly build the template. There are two ways you can use this chapter.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |