Skip to content
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.

Remove function for additional blocks #2

Open
amenk opened this issue Feb 27, 2013 · 1 comment
Open

Remove function for additional blocks #2

amenk opened this issue Feb 27, 2013 · 1 comment

Comments

@amenk
Copy link

amenk commented Feb 27, 2013

Thanks for sharing your excellent work!! The LayoutHelper in
particular is a great tool for someone almost just starting out
with Magento but loving the xml layout system. But there are
of course a few tough knots left that would have been gone if
only the removeLink command was applicable everywhere :)

I had a quick look at doing the same for top & footer.links but
realised it was beyond my knowledge so here's me asking if
perhaps you had already tested that and if you have any result
from it?

In the account nav there's the obvious constant $name but I fail
to find the equivalent in the other links.

Wish you a good day :)

Peter Svegrup [via e-mail]

@amenk
Copy link
Author

amenk commented Feb 27, 2013

Hi Peter,

in Mage_Page_Block_Template_Links (which is responsible for the top.links) there are already some remove functions.

  • removeLinkBlock()
  • removeLinkByUrl()

It might be possible to add an removeLinkByName or ByTitle which could look very similar to the removeLinkByUrl mehtod. Here you have to take care that the title and name tags can be translated - so when calling this method in the layout.xml the translate="..." attribute has to be added so that the link is matched in the correct language.

But maybe removeLinkByUrl is already sufficient for your use case?

Alexander

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant