Wednesday, May 8, 2013

Make lang and dir attributes of html tag Dynamic in joomla! 2.5

Just edit your template index.php file. If it's a normalized template it should contain:
<html xmlns="" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

if not you must replace lang and dir attributes content with this  :

<?php echo $this->language; ?> // for Lang
<?php echo $this->direction; ?> // for Direction

Note: if you use frameworks like T3, Gantry or others you must you will not find html tag in index.php file, you must search in directory that contain template blocks.

Now you will get a template that change their html tag attributes dynamically.

Disqus Comments