?
avatar alonextou
alonextou
12 Dec 2012

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

avatar awc737 awc737 - open - 12 Dec 2012
avatar javigomez
javigomez - comment - 12 Dec 2012

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

avatar awc737
awc737 - comment - 12 Dec 2012

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.

avatar awc737
awc737 - comment - 12 Dec 2012

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
/**

  • @package Joomla.Plugin
  • @subpackage System.Disable_bootstrap *
  • @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
  • @license GNU General Public License version 2 or later; see LICENSE */

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);

        }
    }
}

}

avatar nicksavov
nicksavov - comment - 5 May 2013

Hi guys,

What's the status on this one?

avatar LeCanardNoir
LeCanardNoir - comment - 19 Sep 2013

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.

avatar zero-24 zero-24 - close - 13 Oct 2013
avatar brianteeman brianteeman - close - 13 Oct 2013
avatar brianteeman
brianteeman - comment - 13 Oct 2013

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

avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?
Removed: ?
Build staging
avatar oliverberghold
oliverberghold - comment - 18 Nov 2015

@LeCanardNoir - You saved my day...

Add a Comment

Login with GitHub to post a comment