0
Welcome Guest! Login
0 items Join Now

How to Turn OFF Mootools Head Tag for in Gantry?

  • How to Turn OFF Mootools Head Tag for in Gantry?

    Posted 14 years 1 month ago
    • How to can we Turn OFF Mootools js Head Tag for in Gantry?

      I am using Parainvite Pro and it is not compatible with the older version of mootools.

      ParaInvite uses the latest Mootools version (1.2) for its javascript features.

      How can I disable the mootools js tag in the header when the ParaInvite component is active on the frontend?

      Under the normal joomla framework, the code below does the job beautifully just by placing some code above "<jdoc:include type="head" />"...

      <?php
      $simbunch = ($option == 'com_parainvite') ? true : false;
      $document =& JFactory::getDocument();
      if ($simbunch) {
      $parameter_script = 'scripts';
      $headerstuff = $document->getHeadData();
      reset($headerstuff[$parameter_script]);
      foreach ($headerstuff[$parameter_script] as $key=>$value){
      if (substr_count($key, 'mootools') > 0)
      unset($headerstuff[$parameter_script][$key]);
      }
      $document->setHeadData( $headerstuff );
      }
      ?>
      <jdoc:include type="head" />


      Any takers?

      Thank you so much!
    • Brian Towles's Avatar
    • Brian Towles
    • Hero Rocketeer
    • Posts: 451
    • Thanks: 9
    • Geekus Maximus

    Re: How to Turn OFF Mootools Head Tag for in Gantry?

    Posted 14 years 1 month ago
    • If you comment it out and replace it with your own im not sure how everything will behave. It think it will may break a lot...

      But If you want to try it look in the core/gantry.class.php there is a line for enabling mootools via the standard Joomla mootools behavior.


      Its in the init() function.
       
      JHTML::_('behavior.mootools');
       

Time to create page: 0.038 seconds