开发者

magento Baseurl from helper function

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜