1

I would like to change my header when I went to another page, but I am not able to put my html file. I searched before coming here to ask, I tried this way, but just remove the header, I can not add another.

ultimo/default/layout/local.xml

<checkout_cart_index><!-- Custom static blocks -->
    <reference name="checkout.cart">
        <remove name="header" />
        <block type="page/html_header" name="header" template="page/html/header_checkout.phtml"/> 
        <block type="cms/block" name="block_cart_below_table">
            <action method="setBlockId"><block_id>block_cart_below_table</block_id></action>
        </block>
        <block type="cms/block" name="block_cart_below_totals">
            <action method="setBlockId"><block_id>block_cart_below_totals</block_id></action>
        </block>
    </reference>
</checkout_cart_index>

ultimo/default/template/page/html/header_checkout.phtml

<div>
    <h1>test</h1>
</div>
1
  • Remove the <reference name="checkout.cart"> not needed and should give you the result your after if you change the block name also as you are removing header so to be readding will cause conflicts call it something like header.cart Sep 13, 2017 at 19:52

1 Answer 1

2
  1. Go to app/design/frontend/ultimo/default/template/page/html/header/new-header.phtml then put inside your header content.

  2. Go to app/design/frontend/ultimo/default/layout/local.xml then add this:

    <your_layout_handle> // here the page where you want to change the header. Exemple : <catalog_category_view> = The catogory page.
        <reference name="header">
            <action method="setTemplate">
                <template>page/html/header/new-header.phtml</template>
            </action>
        </reference>
    </your_layout_handle>
    
  3. Clear your cache.

With this solution your header will only be changed in the page that you wanted.

Your Answer

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

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