Monday, August 23, 2010

How to remove mootools.js and caption.js from Joomla 1.5

In Joomla 1.5 template file index.php, you just need to put this below code to remove default Joomla JS from page header.

Path : /templates/themename/index.php

<?php
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
$headerstuff = $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff); }
?>
<jdoc:include type="head" />

Replace below 2 lines with above code block.


<jdoc:include type="head" />
<?php JHTML::_('behavior.mootools'); ?>

This above code block will remove following lines from page:

/joomla/media/system/js/mootools.js
/joomla/media/system/js/caption.js

1 comment:

  1. I was looking for this for long time. Now I reached the correct place.Now my moo tools problem has been solved. Thank you very much for this article.

    ReplyDelete