I have tried to show the Customer Navigation menu in Custom template file.

Below is My Code:

<div id="customer_menu">
<?php echo $this->getLayout()->createBlock('customer/account_navigation')->setTemplate('customer/account/navigation.phtml')->toHtml();?>

The menu is not loading well. Showing like below image

enter image description here

Any suggestions will be appreciated.


  • Have you tried to add the customer menu via the layout handle?
    – Amasty
    Aug 13, 2014 at 12:22
  • @Amasty No, I tried via phtml file.
    – VijayS91
    Aug 13, 2014 at 12:29
  • are you want to show in special page???
    – Amit Bera
    Aug 13, 2014 at 12:44
  • @AmitBera yes, i tried to show in Popup
    – VijayS91
    Aug 13, 2014 at 12:46
  • is pop is coming for which page or all page??
    – Amit Bera
    Aug 13, 2014 at 12:48

3 Answers 3


The result you are getting is normal. The block with alias customer/account_navigation does not actually contain the customer account links.
It acts only as a container where other layout files / modules can add links.
If you use a new instance of the block this one will not contain any links.
What I suggest is to add the following code to the layout handle of your page:

<update handle="customer_account" />

This will automatically load the layout directives for the customer account, including the navigation links.
You won't even need to add any html. The block will be displayed on the left sidebar.


Hi can you try of below code

add a event



and observer code

 public function beforeLoadLayout($observer)
    $loggedIn = Mage::getSingleton('customer/session')->isLoggedIn();


And it is show in all page Where left panel is exist in layout

If you want to show

in call page then create new layout

   <customer_account_custom translate="label">
        <label>Customer My Account (All Pages)</label>
       <reference name="yourlayoutreferce">
            <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>

and change in

observer  $observer->getEvent()->getLayout()->getUpdate()

You can add link to your module in the same way as default reviews module does:

    <!-- Mage_Review -->
    <reference name="customer_account_navigation">
        <action method="addLink" translate="label" module="review"><name>reviews</name><path>review/customer</path><label>My Product Reviews</label></action>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.