i have been removing java scripts and CSS files which are not needed on certain pages I have managed to do this for my homepages, my category pages and my product pages but i am struggling to do it for my search page. This is the code i am adding:

    <reference name="head">
            <action method="removeItem"><type>skin_css</type><stylesheet>CSS file path</stylesheet></action>

I assume i need to change catalogsearch_result_index but i am not sure what to

  • Well catalogsearch_result_index is the correct layout handle, unless you're talking about the advanced search page. Mar 5, 2015 at 16:44
  • When i inspect the page that is what appears as the class of the body
    – Adam Allen
    Mar 5, 2015 at 16:46
  • check my answer Mar 5, 2015 at 17:00

1 Answer 1

<catalogsearch_result_index translate="label">
    <reference name="head">
        <action method="removeItem"><type>js</type><name>yourjsname.js</name></action> <!-- For a JS in the js folder -->
        <action method="removeItem"><type>skin_js</type><name>yourjsname.js</name></action> <!-- For a JS in the skin folder -->
        <action method="removeItem"><type>skin_css</type><name>yourcssname.css</name></action> <!-- For CSS in the skin folder -->

add this in the local.xml and clear cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.