2012-07-03 117 views

回答

0

您需要使用佈局文件來解決這個使用<customer_logged_in>標籤。

有你customer.xml一看,你通常會有:

<customer_logged_in> 
    <reference name="topLinks"> 
     <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action> 
    </reference> 
</customer_logged_in> 

<customer_logged_out>等效。這應該引導你到你需要的地方。

如果你真的想這樣做在phtml文件,再看看

$this->helper('customer')->isLoggedIn();