1

Is there a way to detect position of loading javascript libraries in Joomla(my goal is 'framework.bootstrap'). because I currently follow this post but after using "unset" method from [JDataset][2] method collections, the boostrap framework is completely disabled in all Joomla web pages except in

com_finder

component. How can I detect where this library is added with non-standard way because unset method doesn't affect on this component. also: 1) I moved unset method before and after <jdoc:include type="head" /> line, there is no effect 2) use plugin onAfterRender solution to call unset method but no effect again 3) and completely check all codes in com_finder and its dependencies e.g: filters, in admin and site part to find 'framework.bootstrap' in them but I found anything unless in admin part that is not effective for my frontend !!!

Do you have other or better solution for me

1

I think you mean:JHTML::_('bootstrap.framework')

If you want to disable bootstrap anywhere except back-end. Add this:

if( JFactory::getApplication()->isSite() ) return;

at the begining of function framework in file: /libraries/cms/html/bootstrap.php. This is not best solution but will work for any extension that use JHTML for loading boostrap (well almost all of them do).

Tracking where bootstrap has been included

You can use my solution to track all places where this function was called. Just create global array and put there data from debug_backtrace() called inside /libraries/cms/html/bootstrap.php. This will give you complete call chain for each bootstrap include. At the end of system execution (so probably in template) you can print that array.

  • You're right, this is one solution but you know this is non-maintainability for developing in future. Does anyone have another suggestion? I'll try to find a solution which use Joomla template overriding to this change – Sami Jul 12 '15 at 5:34
  • I added description how to use my solution to track bootstrap include event – Artur Stępień Jul 12 '15 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.