![]() The first line stops naughty people looking at your coding and getting up to bad things. This page will show the bare-bones code ready for you to cut and paste into your own design.Ī Joomla template begins with the following lines: Anything added to the template will appear on all pages unless it is added to one of these sections via the Joomla CMS (or customised code). The template works by adding Joomla code into module positions and the component section in your template. Essentially, you make a page (like any HTML page) but place PHP code where the content of your site should go. The index.php file becomes the core of every page that Joomla! delivers. Leave the positions as they are - these are a common set so you will be able to switch easily from the standard templates. The element can be used to define an entire folder at once. The part should contain all the files that you use - you possibly don't know what they are called yet - don't worry, update it later. Your best approach is to copy and paste this into your templateDetails.xml file and change the relevant bits (such as and ). So, as you can see, we have a set of information between markup tags (the s). Change version="2.5" into the version of your Joomla! installation. The syntax of the file is different for each Joomla version.įor and later, use the following version. ![]() The file holds key metadata about the template. Without it, your template won't be seen by Joomla!. The templateDetails.xml file is essential. ![]() Outline of folder and file structure:Ĭreating a basic templateDetails.xml file This may also shorten the loading time of your pages, since the separate file can be cached. Inside the css folder create a file called template.css.Īlthough 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. To keep things organized, make 2 new folders called images and css. Using your favourite text editor create the files index.php and templateDetails.xml. Name this folder after your template i.e. To make the most basic template, create a new folder in the templates folder. The code is presented so it can be copy and pasted with very little modification needed. It will cover the essential files and code needed to create a basic template. The purpose of this tutorial is to serve as an introduction to creating Joomla! templates. 6 Packaging the template for installation.3 Creating a basic templateDetails.xml file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |