1

I have the following code in local.xml, but when it is rendered on the frontend, Magento treats it as a directory/path and adds a trailing forward slash to it. Is there any way I can avoide this?

<customer_account>
    <block type="customer/account_navigation" name="customer_account_navigation" before="-"               template="customer/account/navigation.phtml">
        <action method="addLink" translate="label" module="customer">
            <name>free_returns_label</name>
            <path>media/returns-free-post-label.pdf</path>
            <label>Free Returns Label</label>
        </action>
    </block>
</customer_account>

1 Answer 1

1

try this

<customer_account>
    <block type="customer/account_navigation" name="customer_account_navigation" before="-"               template="customer/account/navigation.phtml">
        <action method="addLink" translate="label" module="customer" json="params">
            <name>free_returns_label</name>
            <path />
            <label>Free Returns Label</label>
            <params>{"_direct":"media\/returns-free-post-label.pdf"}</params>
        </action>
    </block>
</customer_account>
1
  • Genius - Thanks very much, this has done the trick! Jul 23, 2015 at 15:48

Your Answer

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

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