Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Last active January 4, 2016 09:29
Show Gist options
  • Save xcommerce-gists/8601834 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/8601834 to your computer and use it in GitHub Desktop.
Sample Magento system.xml, which defines System > Configuration options
<?xml version="1.0"?>
<!--
/**
* Magento admin configiguration section config
*
* @author Magento
*/
-->
<config>
<sections>
<news>
<class>separator-top</class>
<label>News</label>
<tab>general</tab>
<frontend_type>text</frontend_type>
<sort_order>500</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<view translate="label">
<label>News View Settings</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<enabled translate="label">
<label>Enable News On Frontend</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</enabled>
<items_per_page translate="label">
<label>News Per Page</label>
<comment>Empty value is the same as default 20.</comment>
<sort_order>30</sort_order>
<depends><enabled>1</enabled></depends>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</items_per_page>
<days_difference translate="label">
<label>Number of days since a post has been marked as recently added</label>
<comment>Empty value is the same as default 3.</comment>
<sort_order>50</sort_order>
<depends><enabled>1</enabled></depends>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</days_difference>
</fields>
</view>
</groups>
</news>
</sections>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment