문제

I saw on RELEASE_NOTES.txt on CE 1.8:

  • Fixed #17451: Header Links (top.links.phtml) does not output correctly because it is using the model code (the Toplinks block is deprecated)

However, the $this->getChildHtml('topLinks') call on the demo frontend template seems to output links which addLink method of Mage_Page_Block_Html_Toplinks created: shopping cart, login etc.

I didn't understand that. What is the supposed way of adding those links ?

Thanks.

도움이 되었습니까?

해결책

Mage_Page_Block_Html_Toplinks is indeed deprecated since 1.4.0.1. The new block for adding links is now Mage_Page_Block_Template_Links, which also holds a addLink method. If you check the page.xml you will notice the new block within the header block: <block type="page/template_links" name="top.links" as="topLinks"/>.

So the functionality stays the same, although this new block is more a generic solution instead of just for the header top links.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top