场景:当用户进入Customer Login页面时,想看到页面顶部的菜单项增加一项My Blog
打开layout/customer.xml,在<customer_account_login>标签下加入下面的代码
看上面代码的url标签: <url>http://www.myblog.com</url>
也可以像下面这样传入一个链接
<url helper="customer/getLogoutUrl"/>
这将导致customer模块下的Heper类的getLogoutUrl方法的调用生成恰当的url。
打开layout/customer.xml,在<customer_account_login>标签下加入下面的代码
<reference name="top.links">
<action method="addLink" translate="label title" module="customer">
<label>My Blog</label>
<url>http://www.myblog.com</url>
<title>My Blog</title>
<prepare/>
<urlParams/>
<position>100</position></action>
</reference>
看上面代码的url标签: <url>http://www.myblog.com</url>
也可以像下面这样传入一个链接
<url helper="customer/getLogoutUrl"/>
这将导致customer模块下的Heper类的getLogoutUrl方法的调用生成恰当的url。