I am new in Magento. I am trying to develop a custom Module. My codes are as belows
Location: D:\php\htdocs\magento\app\etc\modules
Remote_Mouse.xml
<?xml version="1.0"?>
<config>
<modules>
<Remote_Mouse>
<active>true</active>
<codePool>local</codePool>
</Remote_Mouse>
</modules>
</config>
Location: D:\php\htdocs\magento\app\code\local\Remote\Mouse\etc config.xml
<?xml version="1.0"?>
<config>
<global>
<modules>
<Remote_Mouse>
<version>0.1.0</version>
</Remote_Mouse>
</modules>
<blocks>
<mouse>
<class>Remote_Mouse_Block</class>
</mouse>
</blocks>
</global>
<frontend>
<layout>
<updates>
<mouse module="Remote_Mouse">
<file>Remote_Mouse.xml</file>
</mouse>
</updates>
</layout>
<routers>
<mouse>
<use>standard</use>
<args>
<module>Remote_Mouse</module>
<frontName>remote</frontName>
</args>
</mouse>
</routers>
</frontend>
</config>
Location:
D:\php\htdocs\magento\app\design\frontend\my_theme\default\layout
mouse.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
</reference>
<mouse_index_index>
<reference name="content">
<block type="remote/brush" template="remote/mouse.phtml" />
</reference>
</mouse_index_index>
</layout>
Location: D:\php\htdocs\magento\app\code\local\Remote\Mouse\Block
Brush.php
<?php
class Remote_Mouse_Block_Brush extends Mage_Core_Block_Template
{
public function myfunction()
{
echo 'mouse';
}
}
Location: D:\php\htdocs\magento\app\code\local\Remote\Mouse\controllers
IndexController.php
<?php
class Remote_Mouse_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout(array('default'));
$this->renderLayout();
}
public function sayHelloAction()
{
echo 'Hello one more time...';
}
}
?>
Location:
D:\php\htdocs\magento\app\design\frontend\my_theme\default\template\remote
mouse.phtml
<?php
echo $this->myfunction();
?>
I could not see any output. Is there any mistake in my code??