您可以删除 customer.xml 中的块“customer_logged_in”,然后您可以像这样在 customer.xml 中添加/制作一个块。
<reference name="content">
<block type="page/html_wrapper" name="my.account.wrapper" translate="label">
<label>My Account Wrapper</label>
<action method="setElementClass"><value>my-account</value></action>
<block type="core/template" name="logout_link" template="customer/logout_link.phtml"/>
</block>
</reference>
logout_link.phtml 的内容类似于,
<?php
$loggedIn = $this->helper("customer")->isLoggedIn();
if($loggedIn == 1){
echo "<a href=\"".Mage::getBaseUrl()."customer/account/logout/\" >LOGOUT</a>";
}else{
echo "<a href=\"".Mage::getBaseUrl()."customer/account/\" >LOGIN</a>";
}?>
……