2

I have a CMS page and I'm trying to make changes via the layout update in Magento for this CMS page.

I was able to use setTemplate to change the template that the hierarchy menu used to build the list of links for this CMS page.

Now I want to move the block to be after the CMS wrapper block of the page. I thought the after tag was what I wanted so I did this:

<reference name="hierarchy_menu" after="cms.wrapper">
    <action method="setTemplate"><name>cms/hierarchy/menu-artists.phtml</name></action>
</reference>

cms.wrapper and hiearchy_menu are both children of the content block. What I'm doing isn't working. I'm not really sure how to get the menu re-positioned like I need.

What am I doing wrong here?

informatik01
  • 16,038
  • 10
  • 74
  • 104
thindery
  • 1,164
  • 4
  • 23
  • 40

1 Answers1

1

I was able to get this to work thanks to the post located here: change order of blocks via local.xml file in magento

the answer!!:

<reference name="content">
    <action method="unsetChild"><alias>hierarchy_menu</alias></action>
    <action method="insert"><blockName>hierarchy_menu</blockName><siblingName></siblingName><after>1</after></action>
    <reference name="hierarchy_menu">
        <action method="setTemplate"><name>cms/hierarchy/menu-artists.phtml</name></action>
    </reference>
</reference>

note on this: i did NOT do this via local.xml. I still put this directly in as the layout update for the specific cms page.

Community
  • 1
  • 1
thindery
  • 1,164
  • 4
  • 23
  • 40