I want to get custom URL from magento helper in this way:
<action
method="addLink"
translate="label title"
module="customer">
<label>About Us</label>
<url
helper="customer/getAboutUsUrl">
about
</url>
<title>About Us</title>
<prepare/>
<urlParams/>
<position>1</position>
</action>
So what I did is define a function getAboutUsUrl()
under local directory within Customer Helper Directory. But it does not return the base url as I expected.
What do I have to do to get the baseurl with about us link?
Thanks
You should use cms/page/getPageUrl
helper method and pass CMS-page identifier as its parameter like in the following example:
<action
method="addLink"
translate="label title"
module="customer">
<label>About Us</label>
<url helper="cms/page/getPageUrl"><pageId>about</pageId></url>
<title>About Us</title>
<prepare/>
<position>1</position>
</action>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With