Skip to main content
3 of 3
added 33 characters in body; edited title

Stop Joomla! 3.4.1 from including scripts in custom component pages

I'm trying to prevent Joomla! 3.4.1 from loading certain default scripts in the front-end template when a custom component is displayed. I am excluding the scripts in the template index.php file as follows:

unset($this->_scripts[JURI::root(true).'/media/jui/js/bootstrap.min.js']);
unset($this->_scripts[JURI::root(true).'/media/jui/js/jquery.min.js']);
unset($this->_scripts[JURI::root(true).'/media/jui/js/jquery-noconflict.js']);

Printing the contents of the $this->scripts array to the screen shows that it is empty on views generated by the component, but it has values and works as expected on all default Joomla! pages.

How can you stop scripts from loading within custom component screens in Joomla! 3.4.1?