Joomla Template Variables


Website Root path

01.<?php echo $this->baseurl ?>
02.
03.Template name
04.<?php echo $this->template;?>
05.
06.$this->baseurl;
07.$this->template;
08.$this->params; // Template specific params object -- defined in the params.ini file
09.// From JDocument:
10.$this->base; // Document base URL -- redundant, as far as I can tell
11.$this->description; // Document description
12.$this->direction; // Contains the document direction setting (default='ltr')
13.$this->language; // Contains the document language setting (default='en-gb')
14.$this->link; // Document full URL
15.$this->title; // Document title
16.$this->_generator; // Document generator (default='Joomla! 1.5 - Open Source Content Management')

Turn off/Remove Mootools in Joomla template on frontend


Use following code to turn off/remove Mootools in Joomla template on frontend.

01.$user =& JFactory::getUser();
02.if($user->get('guest') == 1) {
03.$search = array('mootools', 'caption.js');
04.// remove the js files
05.foreach($this->_scripts as $key => $script) {
06.foreach($search as $findme) {
07.if(stristr($key, $findme) !== false) {
08.unset($this->_scripts[$key]);
09.}
10.}
11.}
12.}