1

I am new to magento. I installed "perfume" theme from magento connect. I want to rearrange two templates in the home page which have names as follows:

  • frontend\base\default\template\page/template/links.phtml
  • frontend\base\default\template\page/switch/languages.phtml

enter image description here


To do so, I created a local.xml file in app/design/frontend/default/perfume/layout directory structure and added the following code:

<?xml version="1.0"?>
<layout>
    <default>
        <reference name="root">
          <remove name="footer_links"/>
          <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml" before="store_language"/>
        </reference>
    </default>
</layout>

But still I can't see any change in the frontend. What could be the reason?

1

If you take a look at app/design/frontend/base/default/layout/page.xml on line 105 you'll find the footer_links that you are referencing. This one is wrapped in the block footer (line 99)

So that means that the root reference should actually be footer.

<?xml version="1.0"?>
<layout>
    <default>
        <reference name="footer">
          <remove name="footer_links"/>
          <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml" before="store_language"/>
        </reference>
    </default>
</layout>

As far as I can tell the only thing you've changed is the before attribute. Although I haven't tested it you could try and do something like this:

<?xml version="1.0"?>
<layout>
    <default>
        <reference name="footer_links">
            <action method="setAttribute"><key>before</key><value>store_language</value></action>
        </reference>
    </default>
</layout>

But again, I'm not 100% sure that works so let me know if you try it.

  • yeah sure I will let you know. Thanks. I am trying now. – Mr_Green Sep 4 '13 at 11:00
  • I have tried both ways. no changes.. there are no console errors. – Mr_Green Sep 4 '13 at 11:04
  • actually as far as I can see in the default footer in page.xml there is no store_language only a store_switcher. Did you include the store_language yourself? – Sander Mangel Sep 4 '13 at 11:08
  • Hey, I just realized that languages.phtml is in header parent block whereas links.phtml is in footer parent block. does it has to do something? – Mr_Green Sep 4 '13 at 11:10
  • no, I haven't included. maybe the theme "perfume" included it. please check the image for better understanding. – Mr_Green Sep 4 '13 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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