1

I'm studying to get FE certification and I'm trying to add a link to top.links block adding this code to local.xml:

<action method="addLink" block="top.links">
 <label>shop</label>
 <url>http://google.com</url>
 <title>test</title>
 </action>

Although it works properly, I can't find any reference or example using the "block" parameter inside the "action" tag. Anyone knows which parameters are allowed in the action tag? thanks

asked Feb 9, 2015 at 14:42

1 Answer 1

3

I believe you can find the answer by looking at _generateAction method inside Mage_Core_Model_Layout class. You will find following strings:

  • ifconfig
  • method
  • block
  • helper
  • json
answered Feb 9, 2015 at 14:56
2
  • found it, thanks.Do you know why I can't find any reference about the block parameter in the Magento Design Guide for example? Commented Feb 9, 2015 at 15:03
  • 1
    By default, the block parameter is not used. If omitted, the action method will reference the parent block directive. Adding the "block" parameter will tell the action directive to ignore this and instead use the block you referenced. It is not referenced because it is not a commonly used parameter. Action directives are primarily used through node nesting. Commented Feb 9, 2015 at 17:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.