6

In a previous question I already got clarified how exactly did <jdoc:include type=head> work. Now I have a new question about it.

Basically, any extension can add a call to new scripts, css files or tags that will be "catched" by the jdoc:include and injected in the <head> of the template.

The question is: is there a way to debug where each line loaded in the <head> by the include comes from?

For example, I had to work in a project where someone else provided a custom component with some custom modules, and I was seeing some strange stuff loaded in my <head>... so I had to inspect all view files one by one until I found which one was making the call that loaded those lines... is there a way to know where are these calls coming from? Hope it makes sense.

5

Not sure if this will answer your query but the first thing I would do is look here:

/libraries/joomla/document/html/renderer/head.php

In terms of modules adding 'strange' stuff; well they could for instance use JFactory::getDocument()->addScript(); to add their own module JS, so I would check the module code for that.

  • Thanks for your reply. i know that, and that's actually the kind of stuff I searched. I just wondered if there was any "flag" or something like that I could add to debugging so that I could know where exactly are those calls coming from in a debug view (maybe even in core's debug). Thanks anyway. – Isidro Baquero Dec 5 '14 at 17:59

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.