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=”https://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=”https://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=”https://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-> ? Technically 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 to Read More >