xml - Magento 1.7*: How do I add "Logout"-link in the sidebar, of my-account-page -
i add "logout" link magento shop, developing.
in page "my account", left sidebar under links (last link @ bottom):
- account dashboard
- account information
- adress book
- etc.
how add link @ bottom?
i think should add line of code in customer.xml.
i guess should in block:
<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addlink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>account dashboard</label></action> <action method="addlink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>account information</label></action> <action method="addlink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>address book</label></action> </block>
and in line of:
<action method="addlink" translate="label" module="customer"><name>logout</name><path>logout_path</path><label>logout</label></action>
i'm not sure exact code should be.
thanks in advance help
while solution works, considered best practice make layout changes within file app/design/frontend/your_package/your_theme/layout/local.xml
, refrain editing other layout files directly.
for change, local.xml like:
<?xml version="1.0"?> <layout version="0.1.0"> <customer_account> <reference name="left"> <reference name="customer_account_navigation"> <action method="addlink" translate="label" module="customer"> <name>logout</name> <path>customer/account/logout/</path> <label>log out</label> </action> </reference> </reference> </customer_account> </layout>
local.xml reference
a resource start using local.xml on page:
classy llama's better way modify magento layout
article better without word wrapping cover of means of editing layout.
Comments
Post a Comment