cancel
Showing results for 
Search instead for 
Did you mean: 

Positioning of a block in local.xml

Positioning of a block in local.xml

Hey guys.

 

Looking for your help because I have no idea anymore what is wrong. Could you please have a look and let me know if you know the solution?!

 

I have a new callout and have to display it on the left sidebar. So I went to app/design/frontend/mytemplate/default/layout/local.xml and added the new block. The code snip looks like this:

<reference name="left">
  <block type="core/template" name="top.search" as="topSearch" before="amshopby.navleft" template="catalogsearch/form.mini.phtml"/>
  <block type="core/template" name="left.permanent.callout.2" template="callouts/aktion-buttons.phtml" after="amshopby.navleft" />
  <remove name="catalog.leftnav"/>
  <remove name="left.newsletter"/>
  <remove name="left.permanent.callout"/>
  <block type="core/template" name="left.callout.news" template="callouts/news.phtml" after="left.permanent.callout.2" />
</reference>

My problem is the last block, I named left.callout.news. This block has to be at the end, the last block of all. So I added the tag

after="left.permanent.callout.2"

My knowledge is, this tag will display it after the block called left.permanent.callout.2, but it isn't. My news block is shown before all other blocks. But the block left.permanent.callout.2 ist the last one on the sidebar.

I have no clue what is wrong. Do you?

 

It would be very nice if you can share your knowledge with me ;-)

 

Thanks a lot in advance!

 

1 REPLY 1

Re: Positioning of a block in local.xml

Hi there,

 

have you tried using dash as the after like this:

 

<block type="core/template" name="left.callout.news" template="callouts/news.phtml" after="-" />

This is telling Magento to load it after everything else.

 

Let me know how you get on.

 

Thanks,

Gareth.

If you're happy with this response - please mark it as a solution!
Magento Certified Front-end Developer | www.iweb.co.uk