Magento Forum

   
Adding a link to top.links from my own layout xml
 
Stefan Graf
Jr. Member
 
Total Posts:  7
Joined:  2008-07-30
 

Is it possible to add a link to top.links in my own module’s layout file?

I tried this but have not been able to get a link to show up so far:

<default>
        <
reference name="top.links">
            <
action method="addLink" translate="label title" module="bid"><label>My Bids</label><url helper="bid/getBidsListUrl"/><title>Show list of bids</title><prepare/><urlParams/><position>15</position></action>
        </
reference>
    </default>

Is the only other option to directly modify page.xml?

Any help would be appreciated.

Stefan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Seiji
Jr. Member
 
Total Posts:  9
Joined:  2008-06-28
 

Is there anyone who can help with this?  I’m struggling with getting this to work myself.  So far this is the error I keep getting:

Fatal errorUncaught exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Zipcode_Block_Links' in /Users/xxxx/Sites/magento/app/Mage.php:375

This

Mage_Zipcode_Block_Links
is supposed to be
Mycompany_Zipcode_Block_Links

I’ve got the following directory structure:

app/code/local/Mycompany/Zipcode/Block/Links.php
                                
/etc/config.xml
                                
/Helper/Zip.php
                                
/Model/Mycompany_Model/Zip.php

app
/design/frontend/mycompany/mytheme/layout/zipcode.xml

I also set the design for my store under System > Design to mytheme

Anyone?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Seiji
Jr. Member
 
Total Posts:  9
Joined:  2008-06-28
 

bump...please help!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Black Cat
Mentor
 
Avatar
Total Posts:  3456
Joined:  2008-02-14
Assemini / Cagliari (Italy)
 

i have same problem!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrphp
Jr. Member
 
Total Posts:  18
Joined:  2008-06-01
 

I’m also struggling on how to add and edit the top navigation. Any help will be highly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
anthonyfojas
Member
 
Total Posts:  33
Joined:  2008-08-19
 

Stefan,
Is your helper setup in your config.xml file?  Do you already have an item in position 15?  Are you getting any errors in your log file that magento might be ignoring?

Seiji
It looks like your config.xml file might be missing the block declaration

<blocks>
    <
zipcode>
        <class> 
Mycompany_Zipcode_Block</class> 
    </
zipcode>
</
blocks>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top