Unset is not working for jquery and bootstrap.
JHtml::_('jquery.framework', false); in the template override doesn't work except for "jquery-noconflict.js".
BTW I am not interested in extension.

Code: Select all
<?php
// Remove Scripts
$doc = JFactory::getDocument();
unset($doc->_scripts[JURI::root(true) . '/media/system/js/mootools-more.js']);
unset($doc->_scripts[JURI::root(true) . '/media/system/js/mootools-core.js']);
unset($doc->_scripts[JURI::root(true) . '/media/system/js/core.js']);
unset($doc->_scripts[JURI::root(true) . '/media/system/js/modal.js']);
unset($doc->_scripts[JURI::root(true) . '/media/system/js/caption.js']);
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery.min.js']);
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery-noconflict.js']);
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/bootstrap.min.js']);
?>
Code: Select all
$app = JFactory::getApplication();
$sitename = $app->get('sitename');
$doc = JFactory::getDocument();
$head = $doc->getHeadData();
unset($head['metaTags']['http-equiv']);
unset($head['metaTags']['standard']['title']);
unset($head['metaTags']['standard']['rights']);
unset($head['metaTags']['standard']['language']);
$doc->setHeadData($head);
$doc->setGenerator('');
$doc->setMetadata('X-UA-Compatible', 'IE=edge,chrome=1');
$doc->setMetadata('viewport', 'width=device-width, initial-scale=1.0');
$doc->setMetadata('Author', 'none');
$doc->setMetadata('copyright', htmlspecialchars($app->getCfg('sitename')));
//$doc->setMetadata('google-verification', 'xxxxxxxxxxxxxxxx');
$doc->addStyleSheet('templates/' . $this->template . '/css/style.css');
$doc->addStyleSheet('templates/' . $this->template . '/css/bootstrap.min.css');
$doc->addScript('templates/' . $this->template . '/js/bootstrap.min.js');
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery.min.js']);
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery-noconflict.js']);
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery-migrate.min.js']);
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/bootstrap.min.js']);
unset($doc->_scripts[JURI::root(true) . '/media/system/js/caption.js']);
Code: Select all
<script src="/site/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(window).on('load', function() {
new JCaption('img.caption');
});
jQuery(document).ready(function(){
jQuery('.hasTooltip').tooltip({"html": true,"container": "body"});
});
</script>
Code: Select all
unset($doc->_scripts[JURI::root(true) . '/media/jui/js/bootstrap.min.js']);
Code: Select all
<jdoc:include type="head" />