Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Created January 17, 2014 22:01
Show Gist options
  • Save xcommerce-gists/8482556 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/8482556 to your computer and use it in GitHub Desktop.
Sample /app/code/community/Magentostudy/News/etc for the News Management extension
<?xml version="1.0"?>
<!--
/**
* Module configuration
*
* @author Magento
*/
-->
<config>
<modules>
<Magentostudy_News>
<version>1.0.0.0.1</version>
</Magentostudy_News>
</modules>
<global>
<models>
<magentostudy_news>
<class>Magentostudy_News_Model</class>
<resourceModel>news_resource</resourceModel>
</magentostudy_news>
<news_resource>
<class>Magentostudy_News_Model_Resource</class>
<entities>
<news>
<table>magentostudy_news</table>
</news>
</entities>
</news_resource>
</models>
<helpers>
<magentostudy_news>
<class>Magentostudy_News_Helper</class>
</magentostudy_news>
</helpers>
<blocks>
<magentostudy_news>
<class>Magentostudy_News_Block</class>
</magentostudy_news>
</blocks>
<resources>
<magentostudy_news_setup>
<setup>
<module>Magentostudy_News</module>
<class>Mage_Core_Model_Resource_Setup</class>
</setup>
</magentostudy_news_setup>
</resources>
<events>
<before_news_item_display>
<observers>
<magentostudy_news>
<class>magentostudy_news/observer</class>
<method>beforeNewsDisplayed</method>
</magentostudy_news>
</observers>
</before_news_item_display>
</events>
</global>
<frontend>
<routers>
<magentostudy_news>
<use>standard</use>
<args>
<module>Magentostudy_News</module>
<frontName>news</frontName>
</args>
</magentostudy_news>
</routers>
<layout>
<updates>
<magentostudy_news>
<file>magentostudy_news.xml</file>
</magentostudy_news>
</updates>
</layout>
</frontend>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<Magentostudy_News before="Mage_Adminhtml">Magentostudy_News_Adminhtml</Magentostudy_News>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<magentostudy_news>
<file>magentostudy_news.xml</file>
</magentostudy_news>
</updates>
</layout>
</adminhtml>
<default>
<news>
<view>
<enabled>1</enabled>
<items_per_page>20</items_per_page>
<days_difference>3</days_difference>
</view>
</news>
</default>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment