I'm trying to build a customized system plugin and I use the event 'onAfterRoute'. I'm trying to get head data using
$document =& JFactory::getDocument();
$hData = $document->getHeadData();:
(see below part of the code)
- Code: Select all
class plgSystemExample extends JPlugin {
function plgSystemExample (&$subject, $config) {
parent::__construct($subject, $config);
}
function onAfterRoute () {
$document =& JFactory::getDocument();
$hData = $document->getHeadData();
.........
The value of $hData['scripts'] after $hData = $doc->getHeadData() method is the following:
- Code: Select all
Array
(
[/media/system/js/mootools.js] => text/javascript
[http://localhost/templates/gk_corporate2/js/domready_fix.js] => text/javascript
[/media/system/js/modal.js] => text/javascript
[http://localhost/components/com_k2/js/k2.js] => text/javascript
)
ommiting the other 2 JS files that are included in the document:
- Code: Select all
[http://localhost/modules/mod_news_pro_gk4/interface/scripts/engine.js] => text/javascript
[http://localhost/templates/gk_corporate2/js/gk.script.js] => text/javascript
Because I'm stuck on this, can you please help me how can I retreive all JS files
from the document?
Thanks in advance,
George