After creating a custom page (and navigation link) in the customer account section, there seems to be an issue with keeping the link active (in the customer_account_navigation block) when going to a sub page.
In other words: I have a custom customer page called 'dealers/orders', when clicked on the link called 'Dealer orders' is highlighted on the right hand side.
However when a dealer clicks on 'order details' which takes them to dealers/orders/orderdetails/id/x the link on the right hand side is not active.
Here is what I tried so far:
Setting the following in my xml for the page:
<dealers_orders_orderdetails>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
<block type="customer/account_navigation" name="navigation_dealer">
<action method="setActive"><path>dealers/orders</path></action>
</block>
</reference>
</dealers_orders_orderdetails>
The setActive
function is being called (can see it when logging) but it doesn't seem to highlight the desired link.
Any help would be appreciated
Best Answer
To manually specify which tab that you would like highlighted in the customer account section, you will need to specify the
setActive
method with reference to thecustomer_account_navigation
block.With reference to specifically what you are trying to do, I see you are creating your own dealer section, with this in mind try move your block into the content section and not the root section though I can not test if this will achieve exactly what you are trying to do.