219: Joomla 2.5 Template Development Tutorial
Joomla 2.5 Templates - defined('_JEXEC') or die
_JEXEC is a variable defined in Joomla's main index.php file. When you check if the variable has been defined yet, you can learn whether a file is being accessed directly or is being included as it should.
Joomla 2.5 Templates - $showRightColumn
The $showRightColumn variable has a 1 or 0 value. If there are no modules being loaded in the right column, it has a value of 0, or false. Likewise, if modules are being loaded, it has a value of 1, or true.
Joomla 2.5 Templates - $this->countModules('position-3')
The $this-countModules() function returns the total number of active modules for the given position. In this tutorial, we'll show you how it works.
Joomla 2.5 Templates - $this->params->get('templatecolor');
When using $this-params-get() in a Joomla 2.5 template file, you can call the value of a parameter set by the user for the template. For example, if your template allows the user to enter the background color of the template, using $this-params-get you can grab the color the user entered.
Joomla 2.5 Templates - JFactory::getApplication()
While JFactory::getApplication() can be used in many different ways, it appears it is only used in the Beez2 template to get the value of the site's title and description (which are Advanced Options) for the template.
Joomla 2.5 Templates - JFactory::getDocument()
Joomla 2.5 Templates - $this->
The $this variable is used quite often in the Beez2 Joomla 2.5 template, and it references the JDocumentHTML Object.
Joomla 2.5 Templates - $this->baseurl
In this tutorial, we'll show you how to use the $this-baseurl variable within a Joomla template to reference your site's URL.
Joomla 2.5 Templates - $this->template
$this-template in a Joomla 2.5 template can be used to get the folder name of the current template, which is helpful for dynamically creating URLs to css and other files.
Joomla 2.5 Templates - $this->language
The $this-language variable in Joomla 2.5 can be used to reference the current language being used, such as en-gb or es-es.
Joomla 2.5 Templates - $this->direction
$this-direction in a Joomla 2.5 template gives you access to the direction text has been set to (for example ltr - left to right).
How to add a new position to a Joomla 2.5 Template
In the following Joomla 2.5 template tutorial, we'll show you how to add a new position to your template.
Joomla 2.5 Templates - $files = JHtml::_(stylesheet)
$files = JHtml::_(stylesheet) is used in our Joomla 2.5 template's index.php file as a method of loading a css file, general.css
If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)