Wednesday, September 01, 2010

How to remove mootools.js and caption.js from Joomla1.5 ?



 
 
  <script type="text/javascript" src="/media/system/js/mootools.js"></script>  
  <script type="text/javascript" src="/media/system/js/caption.js"></script>  
To remove above javascript's import, you just need to 
add the following code at the top of your template's index.php file.
 <?php   
           //remove mootools.js and caption.js  
           $headerstuff=$this->getHeadData();  
           reset($headerstuff['scripts']);  
           foreach($headerstuff['scripts'] as $key=>$value){  
            unset($headerstuff['scripts'][$key]);  
           }            
           $this->setHeadData($headerstuff);  
 ?>  

No comments: