Question

I would like to reorder the wishlist in top links through xml file not editing the

app\code\core\Mage\Wishlist\Block\Links.php

Wondering why below code does not work?

  <default>
        <reference name="top.links">
            <block type="wishlist/links" name="wishlist_link" />
            <action method="addLinkBlock"><blockName>wishlist_link</blockName><prepare/><urlParams/><position>100</position></action>
        </reference>
</default>
Was it helpful?

Solution

It is not working because there is no function addLinkBlock available in app\code\core\Mage\Wishlist\Block\Links.php this file/Class nor in it's parents class.

You can use AddLink action which you can find in app/code/core/Mage/Page/Block/Template/Links.php file.

You can use following

<default>
        <reference name="top.links">
              <action method="addLink" translate="label title"><label>Wishlist</label><url>wishlist</url><title>Wishlist</title><prepare/><urlParams/><position>100</position></action>
        </reference>
</default>

Hope it helps

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top