Last active
December 22, 2015 11:18
-
-
Save 0-Sony/3dfae102b4796f750b68 to your computer and use it in GitHub Desktop.
Declare all Blocks, Models, Helpers, layout and observers for a module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- local/Namespace/module/etc/config.xml --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<config> | |
<global> | |
<blocks> | |
<namespace_module> | |
<class>Namespace_Module_Block</class> | |
</namespace_module> | |
</blocks> | |
<models> | |
<namespace_module> | |
<class>Namespace_Module_Model</class> | |
</namespace_module> | |
</models> | |
<helpers> | |
<namespace_module> | |
<class>Namespace_Module_Helper</class> | |
</namespace_module> | |
</helpers> | |
</global> | |
<frontend> | |
<!-- Declare your xml for layout --> | |
<layout> | |
<updates> | |
<namespace_module module="Namespace_Module"> | |
<file>namespace_module.xml</file> | |
</namespace_module> | |
</updates> | |
</layout> | |
<!-- Don't forget to create observer.php in your Model folder --> | |
<events> | |
<name_of_event_to_hook> | |
<observers> | |
<namespace_module_custom_name> <!-- Name of your observer, must be unique --> | |
<class>namespace_module/observer</class> | |
<method>myCustomMethod</method> | |
</namespace_module> | |
</observers> | |
</name_of_event_to_hook> | |
</events> | |
</frontend> | |
</config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment