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

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
  • found it, thanks.Do you know why I can't find any reference about the block parameter in the Magento Design Guide for example? – Antonio Pedicini Feb 9 '15 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. – Ryan Street Feb 9 '15 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.