S
S
Stepan2014-08-22 13:01:18
CMS
Stepan, 2014-08-22 13:01:18

How to swap blocks between footer and header in Magento?

You need to move the search block from the header to the footer, and move the subscription block from the footera to the header.
How to do this with XML help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stepan, 2014-08-22
@xoma2

All figured out. If anyone needs help please write.
As promised
. We take our code with the search template, and paste it into local.xml in reference name="footer"

<reference name="footer">
            <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
        </reference>

In this we also create another one in order to hide in the search in the header
<reference name="header">
<remove name="top.search">
</reference>

All that remains is to call this template in footer.phtml
One XML is not enough, you also need to call this template in the desired block.
We do the same with news. Thus, we make changes without touching the standard templates. It's very comfortable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question