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="" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

When we look at the result of the following code in our Joomla 2.5 site’s HTML, it looks like the following:

<html xmlns="" xml:lang="es-es" lang="es-es" dir="ltr" >

As you can see, $this->direction specifies the direction of text in the template. In our example, the value is ltr, left to right.

This entry was posted in Joomla 2.5.

Related Articles

Was this article helpful? Let us know!