I am following Alan Storms documentation to add a custom tab to accounts page but unfortunately I am running into a hiccup. I am not able to route and load my controller when I click on my custom link tab within accounts. I can definitely add the custom tab but routing the url once I click on it is not doing anything. Running version 1.9.0.1
app/code/community/Brandster/CustomAccount/etc/config.xml
<?xml version="1.0"?>
<config>
<frontend>
<layout>
<updates>
<brandster_customaccount module="Brandster_CustomAccount">
<file>brandster_customaccount.xml</file>
</brandster_customaccount>
</updates>
</layout>
<routers>
<brandster_customaccount>
<use>standard</use>
<args>
<module>Brandster_CustomAccount</module>
<frontName>brandster_customaccount</frontName>
</args>
</brandster_customaccount>
</routers>
</frontend>
<global>
<helpers>
<brandster_customaccount>
<class>Brandster_CustomAccount_Helper</class>
</brandster_customaccount>
</helpers>
</global>
</config>
app/design/frontend/mytheme/mypackage/layout/brandster_customaccount.xml
<?xml version="1.0"?>
<layout>
<customer_account>
<reference name="customer_account_navigation">
<action method="addLink">
<name>our_new_section</name>
<path>brandster_customaccount/index/index</path>
<label>Terms & Conditions</label>
</action>
</reference>
</customer_account>
<brandster_customaccount_index_index>
<update handle="customer_account" />
</brandster_customaccount_index_index>
</layout>
app/code/community/Brandster/CustomAccount/Controllers/IndexController.php
<?php
class Brandster_CustomAccount_IndexController extends Mage_Core_Controller_Front_Action {
public function preDispatch()
{
parent::preDispatch();
$action = $this->getRequest()->getActionName();
$loginUrl = Mage::helper('customer')->getLoginUrl();
if (!Mage::getSingleton('customer/session')->authenticate($this, $loginUrl)) {
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
}
}
}
app/code/community/Brandster/CustomAccount/Helper/Data.php
<?php
class Brandster_CustomAccount_Helper_Data extends Mage_Core_Helper_Abstract
{
}