Hi Chris, it did works ! but only when i remove a single array, if i did this:
$doc = JFactory::getDocument();
$headData=$doc->getHeadData();
unset($headData['styleSheets'][JURI::base(true).'/libraries/cck/rendering/assets/css/content.css']);
unset($headData['styleSheets'][JURI::base(true).'/libraries/cck/rendering/assets/css/cck.css']);
unset($headData['scripts'][JURI::base(true).'/media/cck/scripts/jquery/js/jquery-more.js']);
$doc->setHeadData( $headData );
it won't work... any idea ?
Pada Minggu, 19 Agustus 2012 14:31:10 UTC+7, Chris Davenport menulis:
Did you do a $doc->setHeadData( $headData ); afterwards?
Chris.
Hello all, i try to remove some script/style in head document from a module/component..
i'm using this code:
$doc = JFactory::getDocument();
$headData=$doc->getHeadData();
unset($headData['styleSheets'][JURI::base(true).'/libraries/cck/rendering/assets/css/content.css']);
when i trace, the array unset successfully, but the style still echo in the document ...
any idea how to make it work ?