Joomla 2.5 Templates – $files = JHtml::_(stylesheet)

In this class, we are learning how to create Joomla 2.5 templates by first looking at the PHP code in the Beez2 index.php file. We have already looked at quite a bit of php code, and as we continue our review we come to the following code: $files = JHtml::_(‘stylesheet’, ‘templates/’.$this->template.’/css/general.css’, null, false, true); if Read More >

How to add a new position to a Joomla 2.5 Template

While reviewing the PHP code in the Joomla 2.5 Beez2 template, we come across the following code: <jdoc:include type=”modules” name=”position-0″ /> The code above defines a new position within a template, in this case position-0. If you want to add a new position to your template, you’ll need to use code similar to the above. Read More >

Joomla 2.5 Templates – $this->direction

The last use of $this in the Joomla 2.5 Beez2 template that will review is $this->direction. We can see it being used in the following section of code in the template’s PHP file: <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>” dir=”<?php echo $this->direction; ?>” > When we look at the result of Read More >

Joomla 2.5 Templates – $this->language

In our last few tutorials, we have covered the $this variable in Joomla 2.5 templates. We will continue focusing on $this, and this time examining the following code: <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>” dir=”<?php echo $this->direction; ?>” > The output of the above PHP code results in the following code Read More >

Joomla 2.5 Templates – $this->template

In the Joomla 2.5 Beez2 template, we see the following PHP code in the index.php file: $doc->addScript($this->baseurl.’/templates/’.$this->template.’/javascript/md_stylechanger.js’, ‘text/javascript’, true); In this tutorial, we will focus on $this->template.   What is $this->template To find out what the value is of $this->template, we will update our template’s code as follows: $doc->addScript($this->baseurl.’/templates/’.$this->template.’/javascript/md_stylechanger.js’, ‘text/javascript’, true); echo “<pre>” . $this->template Read More >

Joomla 2.5 Templates – $this->

We are continuing to review Joomla 2.5’s Beez2 template code, and we next come accross the following code: <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>” dir=”<?php echo $this->direction; ?>” > In our review thus far, we have alread seen instances of $this->, for example: $showRightColumn $this->countModules $this->params->get   What is $this-> ? Read More >

Joomla 2.5 Templates – JFactory::getDocument()

In our continued effort to review the PHP code in the Joomla 2.5 Beez2 template, we come across the following code: // get params $color = $this->params->get(‘templatecolor’); $logo = $this->params->get(‘logo’); $navposition = $this->params->get(‘navposition’); $app = JFactory::getApplication(); $doc = JFactory::getDocument(); Our specific focus in this article will be $doc = JFactory::getDocument().   What is getDocument? According Read More >

Joomla 2.5 Templates – $this->params->get(‘templatecolor’);

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here. Continuing with our review of the Beez2 template, the next set of code in the template’s index.php file we will look Read More >

Joomla 2.5 Templates – $this->countModules(‘position-3’)

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here. Continuing with our tutorial on learning how to create Joomla 2.5 templates, we will once again review the following code: // Read More >