When you add a block directly inside header
block, magento will put your block just after all of it's child block that are added via other layout xml files that are processed before your pinsearch.xml
.
Basically a header block contains following blocks by default. This is added via page.xml
which will get processed before your pinsearch.xml
<block type="page/html_header" name="header" as="header">
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
<block type="core/text_list" name="top.menu" as="topMenu" translate="label">
<label>Navigation Bar</label>
<block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
</block>
<block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
<label>Page Header</label>
<action method="setElementClass"><value>top-container</value></action>
</block>
<block type="page/html_welcome" name="welcome" as="welcome"/>
</block>
see top.container
(which is the wrapper block that you are mentioning, I hope) block is loading here. So when we add your block directly under header
block, it just come just below welcome
(This is not accurate. But if we consider page.xml
only, this is true :-))
So if you need your block just inside the wrapper block, then what you need to is include your block inside wrapper block itself
<default>
<reference name="header">
<reference name="top.container">
<block type="core/template" name="pinsearch" template="pinsearch/pinsearch.phtml"/>
</reference>
</reference>
<default>
Now suppose you need to include the block as child of header
block itself, but need to display above the wrapper block (or any other child block), then what you need to do is.
<default>
<reference name="header">
<block type="core/template" name="pinsearch" as="pinSearch" template="pinsearch/pinsearch.phtml"/>
</reference>
<default>
Then go to app/design/frontend/<package>/<theme>/template/page/html/header.phtml
and then specify your block wherever you needed to display it as like this
<?php echo $this->getChildHtml('pinSearch') ?>
Hope that clears your doubt.. Happy coding sis :-)
<remove />
is a node which doesn't need to be inside any other node or reference. It is applied "globally" and last, so wherever you put it, it is applied.
You didn't post your complete contacs.xml
so I can only guess, but this should work:
<contacts_index_index translate="label">
<remove name="shopper_footer_banners"/>
</contacts_index_index>
If it doesn't make sure your block has exactly this name and your layout cache is up to date.
Best Answer
If you are using Magento 1.9.x then you have following block references
For Magento 2 For M2
For reference check
page.xml
of your active theme or the fallback theme.footer.before
bottom.container
(this section is the starting point of footer)before_body_end
footer.before
to call before footer section i.e bottom of main container and above of footerYou can call your static block using widgets as well
In Block reference of widget
page footer
will call your static block inbottom.container
section i.e starting of footer section ( you can arrange by priority as well)