I have created and enabled a custom module in my magento store called 'Earnings' to allocate customers loyalty points. I declare the phtml file to use (template/earnings/earnings.phtml)
in my earnings.xml
as below
earnings.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<earnings_index_index>
<reference name="content">
<block type="earnings/earnings" name="earnings" />
</reference>
</earnings_index_index>
</layout>
I want the page that uses this template file to be linked from the customer account navigation when they log in (same place as my addresses/my billing agreements/my orders etc). In my local.xml i use addLink as below:
local.xml
<customer_account>
<reference name="sidebar">
<action method="unsetChild"><name>reorder</name></action>
<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
<action method="addLink" translate="label" module="earnings"><name>earnings</name><path>earnings/earnings/</path><label>Earnings</label></action>
</block>
<remove name="tags_popular"/>
</reference>
</customer_account>
Now when i log into the customer account the link is there,it goes to the url http://www.example.com/earnings/earnings
but this gives my a 404 page not found
I am very new to magento and this is my first go at creating custom modules. Am i missing something or doing something in the wrong way?