Question

I'm having some trouble removing a block from the head on the checkout pages, I have added a core/textlist called before_head_end to the page head in the page.xml so that it is included on all pages:

Page.xml

   <block type="page/html_head" name="head" as="head">
       <block type="core/text_list" name="before_head_end" as="before_head_end">
           <block type="core/template" name="ds_head_extras" as="ds_header_extras" template="dsingleton/headerextras/head_extras.phtml"/>
       </block>
    </block>

Now, I'm trying to remove that same block on the checkout pages only, so in my checkout xml i've tried 3 different ways to remove the block, but none of them works, can someone point out where i'm going wrong?

Checkout.xml First Attempt:

<checkout_onepage_index translate="label">
        <label>One Page Checkout</label>
        <!-- Mage_Checkout -->
        <reference name="head">
            <remove name="before_head_end" />
        </reference>
</checkout_onepage_index>

Second Attempt:

<checkout_onepage_index translate="label">
        <label>One Page Checkout</label>
        <!-- Mage_Checkout -->
        <reference name="head">
            <action method="unsetChild"><name>before_head_end</name></action>
        </reference>
</checkout_onepage_index>

Third Attempt:

<checkout_onepage_index translate="label">
            <label>One Page Checkout</label>
            <!-- Mage_Checkout -->
            <reference name="head">
                <reference name="before_head_ends>
                     <action method="unsetChild"><name>ds_head_extras</name></action>
                </reference>
            </reference>
    </checkout_onepage_index>
Was it helpful?

Solution

At first glance, all of them seem to be fine if you want to remove that block from checkout onepage. The changes you made are going to apply only on checkout_onepage_index handle, so make sure you check checkout/onepage pages. For example, this is not going to affect the cart pages, because they are using checkout_cart_index handle.

Hope it helps, cheers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top