hyperlink - Magento adding new customer account navigation link -
i have issue adding new customer account navigation link password.phtml on customer account dashboard. @ post here bit confuse new in magento. below set of code.
created /customer/account/password.phtml
my module don_configs.xml
<config> <modules> <don_configs> <active>true</active> <codepool>local</codepool> <version>0.1.0</version> </don_configs> </modules> </config>
added local.xml
<customer_account translate="label"> <reference name="left"> <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addlink" translate="label" module="customer"> <name>password</name> <path>customer/password/</path> <label>password</label> </action> </block> </reference> </customer_account>
my password.php
<?php class don_configs_block_password extends mage_core_block_template { public function _preparelayout() { return parent::_preparelayout(); } } ?>
my passwordcontroller.php
<?php class don_configs_passwordcontroller extends mage_core_controller_front_action { public function indexaction() { if(!mage::getsingleton('customer/session')->isloggedin()) { mage::app()->getfrontcontroller()->getresponse()->setredirect(mage::geturl('customer/account')); return false; } $this->loadlayout(); $this->_initlayoutmessages('customer/session'); $this->getlayout()->getblock('head')->settitle($this->__('update password')); $this->renderlayout(); } } ?>
thanks!
try update local.xml this
<customer_account> <reference name="customer_account_navigation"> <action method="addlink" translate="label"> <name>password</name> <path>customer/password/</path> <label>password</label> </action> </reference> </customer_account>
Comments
Post a Comment