I'm developing a Joomla system plugin. I need to add javascript and css files if the certain [myshortcode]
shortcode found in content.
How can I get the content in onBeforeCompileHead function
function onBeforeCompileHead() {
$document = JFactory::getDocument();
//add scripts only if shortcode found
...
$document->addStyleSheet($cssFile, 'text/css', null, array());
The $content = JResponse::getBody();
does not work.
Thanks