I am creating a template from scratch. I am using Foundation Zurb as it is much better than Bootstrap. I've removed any trace of JHtml::('bootstrap.etc); from my template's index.php, and only have in place JHtml::('jquery.framework', false);.
I see many components load bootstrap or a piece of bootstrap, such as JHtml::_('bootstrap.tooltip');. Please, I need any suggestion or workaround to prevent bootstrap from loading at all.
Thanks
Thank you javigomez, my mail list membership is pending.
I have tried creating a system plugin, which onAfterRender() { would parse through $doc->getHeadData();
However, Bootstrap is not yet loaded at this point. I see all my other , even my custom loaded one, somehow bootstrap is being loaded very last, and I am not sure how I can interfere with this.
Is it alright to post code here, for future reference? Here is one workaround I am able to use, using a system plugin:
I love Joomla and appreciate any help here, but I think Joomla needs to think a little outside the box in the future, such as, "what if everyone does not want to live in the same little box", and provide better methods not requiring hacks.
<?php
/**
defined('_JEXEC') or die;
class plgSystemDisable_bootstrap extends JPlugin {
function onBeforeCompileHead() {
$app = JFactory::getApplication();
if (!$app->isAdmin()) {
$on = $this->params->get('disabled', 0);
if ($on) {
$doc = JFactory::getDocument();
if(!method_exists($doc,'getHeadData'))
{
return;
}
$headers = $doc->getHeadData();
$scripts = isset($headers['scripts']) ? $headers['scripts'] : array();
$headers['scripts'] = array();
foreach($scripts as $url=>$type)
{
if (strpos($url, 'bootstrap') === false && strpos($url, 'mootools') === false && strpos($url, 'core') === false && strpos($url, 'caption') === false)
{
$headers['scripts'][$url] = $type;
}
}
$doc->setHeadData($headers);
}
}
}
}
Hi guys,
What's the status on this one?
i use this code and it work for me on the top of my index.pnp template:
<?php
defined('JEXEC') or die;
unset($this->scripts[JURI::root(true).'/media/jui/js/bootstrap.min.js']);
unset($this->scripts[JURI::root(true).'/media/jui/js/bootstrap.js']);
unset($this->scripts[JURI::root(true).'/media/jui/js/jquery.min.js']);
unset($this->scripts[JURI::root(true).'/media/jui/js/jquery.js']);
unset($this->scripts[JURI::root(true).'/media/jui/css/bootstrap-extended.css']);
unset($this->scripts[JURI::root(true).'/media/jui/css/bootstrap-responsive.css']);
unset($this->scripts[JURI::root(true).'/media/jui/css/bootstrap-rtl.css']);
unset($this->scripts[JURI::root(true).'/media/jui/css/bootstrap.css']);
unset($this->scripts[JURI::root(true).'/media/jui/css/icomoon.css']);
?>
i fine the first line of this code here:
http://forum.joomla.org/viewtopic.php?f=713&t=771131
and my page load faster now
i made this because i prefer use bootstrap 3 so make sure why you want do it.
Thanks for reporting this. At this time we are only using github as the place to submit code fixes so I am closing the report here. The actual reporting of issues and testing fixes is still taking place on Joomlacode.
As it has been some time since you opened this issue can you please confirm that it is still valid with the current Master or Joomla 3.2 beta.
If it is still valid please can you open an item on the Joomlacode tracker in the appropriate area.
CMS Bug Reports: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103
CMS Feature Requests: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8549
Labels |
Added:
?
Removed: ? |
||
Build | ⇒ | staging |
@LeCanardNoir - You saved my day...
I recommend you to share this issue in the CMS developers mail list. There many developers will be able to see it and give some advise: https://groups.google.com/forum/?fromgroups#!forum/joomla-dev-cms