I've been trying to remove the "Miscellaneous Scripts" (set in System > Configuration > General > Design > HTML Head > Miscellaneous Scripts
) for a particular CMS page. I've gone to CMS > Pages > Design > Page Layout > Layout Update XML
and entered the following code:
<reference name="head">
<remove name="miscellaneous-scripts"/>
</reference>
This doesn't seem to remove the code from the CMS page. I've tried similar variations such as "header" instead of "head", however, none have worked as of yet. Will somebody please help me in achieving this? Can this successfully be done using this method? Thank you in advance for any constructive contributions!
As per Evan's answer, I have decided to directly edit the template page. I needed to exclude the "Miscellaneous Scripts" on the "Empty" layout. So I went to /app/design/frontend/theme/default/template/page/empty.phtml
. From there, I did a string replace to remove the code from getChildHtml('head').
Changed:
echo $this->getChildHtml('head');
To this:
$headcode = str_replace('<script type="text/javascript" ...>', '', $this->getChildHtml('head'));
echo $headcode;
Now, the code will be excluded only from empty.phtml.