Showing posts with label footer links. Show all posts
Showing posts with label footer links. Show all posts

Monday, April 12, 2010

Move footer links to the top

Problem: How to move footer links to the top of the page
More details here:http://www.magentocommerce.com/boards/viewthread/178685/ or here http://www.magentocommerce.com/boards/viewthread/177423/

Possible solution:
Edit this file:
app/design/frontend/{interface}/{theme}/layout/page.xml
Look for this line:
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
It should be inside of an other <block> tag named footer.
Remove it from there and put it inside the <block> named 'header' (same file).
It should look like this (or close to it):
BEFORE:
<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"/>
</block>
AFTER:
<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"/>
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
</block>

Then edit app/design/frontend/{interface}/{theme}/template/page/html/header.phtml
Add this line at the end of the file (or where ever it fits your needs)
<?php echo $this->getChildHtml('footer_links') ?>
Clear the contents of dir var/cache and it should work. You might need to do some css work so the new added links would look nice.