I have a custom module. I need to add it in home page of my site. I have added block in the content section of my home page. But it didn't display anything. I have also tried the layout part of home page and the result is as in the previous case. These are my codes
app/code/local/Karaokeshop/Banner/etc/config.xml
<config>
<modules>
<Karaokeshop_Banner>
<version>0.1.0</version>
</Karaokeshop_Banner>
</modules>
<frontend>
<routers>
<banner>
<use>standard</use>
<args>
<module>Karaokeshop_Banner</module>
<frontName>banner</frontName>
</args>
</banner>
</routers>
<layout>
<updates>
<banner>
<file>banner.xml</file>
</banner>
</updates>
</layout>
</frontend>
<admin>
<routers>
<banner>
<use>admin</use>
<args>
<module>Karaokeshop_Banner</module>
<frontName>banner</frontName>
</args>
</banner>
</routers>
</admin>
<adminhtml>
<menu>
<!-- <banner module="banner">-->
<cms>
<title>CMS</title>
<sort_order>71</sort_order>
<children>
<items module="banner">
<title>Manage Banner</title>
<sort_order>0</sort_order>
<action>banner/adminhtml_banner</action>
</items>
</children>
</cms>
<!--</banner>-->
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<Karaokeshop_Banner>
<title>Banner Module</title>
<sort_order>10</sort_order>
</Karaokeshop_Banner>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<banner>
<file>banner.xml</file>
</banner>
</updates>
</layout>
</adminhtml>
<global>
<models>
<banner>
<class>Karaokeshop_Banner_Model</class>
<resourceModel>banner_mysql4</resourceModel>
</banner>
<banner_mysql4>
<class>Karaokeshop_Banner_Model_Mysql4</class>
<entities>
<banner>
<table>banner</table>
</banner>
</entities>
</banner_mysql4>
</models>
<resources>
<banner_setup>
<setup>
<module>Karaokeshop_Banner</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</banner_setup>
<banner_write>
<connection>
<use>core_write</use>
</connection>
</banner_write>
<banner_read>
<connection>
<use>core_read</use>
</connection>
</banner_read>
</resources>
<blocks>
<banner>
<class>Karaokeshop_Banner_Block</class>
</banner>
</blocks>
<helpers>
<banner>
<class>Karaokeshop_Banner_Helper</class>
</banner>
</helpers>
</global>
</config>
This is the code I have tried in the content section of home CMS page
{{block type="banner/banner" name="home_banner" template="banner/homenewpro.phtml"}}
This is the code I have tried in the layout part(within content section) of home CMS page.
<block type="banner/banner" name="home_banner" template="banner/banner.phtml" />
What is the problem with this code? What I have made wrong with these codes? Help me guys.... Thanks in advance..
<layout version="0.1.0"> <banner_index_index> <reference name="root"> <action method="setTemplate"> <template>page/1column.phtml</template> </action> </reference> <reference name="content"> <block type="banner/banner" name="home_banner"> </block> </reference> </banner_index_index> </layout>
when i look into the page, the page layout become 1column. however content block is not displaying. my phtml file echo 'test' in it.<block type="banner/banner" name="home_banner" template="banner/banner.phtml"/>
and this<block type="banner/banner" name="home_banner" />
. still not displaying the content