Book Image

Magento PHP Developer????s Guide, 2nd Edition

By : Allan MacGregor
Book Image

Magento PHP Developer????s Guide, 2nd Edition

By: Allan MacGregor

Overview of this book

Table of Contents (16 chapters)
Magento PHP Developer's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The XML module configuration


There are two main files involved in a module configuration, config.xml and system.xml. In addition to these, module configuration is also stored in the following files:

  • api.xml

  • adminhtml.xml

  • cache.xml

  • widget.xml

  • wsdl.xml

  • wsi.xml

  • convert.xml

In this chapter, we will only focus on config.xml. Let's create our base file and break down each of the nodes:

  1. Start by creating the config.xml file under our module etc/ directory.

  2. Copy the given code to config.xml, located at app/code/local/Mdg/Giftregistry/etc/config.xml:

    <?xml version="1.0">
    <config>
      <modules>
        <Mdg_Giftregistry>
          <version>0.2.0</version>
        </Mdg_Giftregistry>
      </modules>
      <global>
        <models>
          <mdg_giftregistry>
            <class>Mdg_Giftregistry_Model</class>
          </mdg_giftregistry>
        </models>
        <blocks>
          <mdg_giftregistry>
            <class>Mdg_Giftregistry_Block...