---
title: "Joomla 2.5 Templates &#8211; $this->direction"
description: "The last use of $this in the Joomla 2.5 Beez2 template that will review is $this-&gt;direction. We can see it being used in the following section of code in the template's PHP file: &lt;html..."
url: https://www.inmotionhosting.com/support/edu/joomla/joomla-2-5/this-direction/
date: 2012-07-19
modified: 2021-08-16
author: "Brad Markle"
categories: ["Joomla", "Joomla 2.5"]
tags: ["Joomla v2.5"]
type: post
lang: en
---

# Joomla 2.5 Templates &#8211; $this->direction

The last [use of $this in the Joomla 2.5 Beez2 template](/support/edu/joomla/joomla-2-5/this/) 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 the following code in our Joomla 2.5 site’s HTML, it looks like the following:

<html xmlns="https://www.w3.org/1999/xhtml" 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*.
