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开发者_JS百科 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>
精彩评论