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

Extending Adminhtml


Mage_Adminhtml is a single module that provides all the backend functionality for Magento through the usage of configuration. As we learned before, Magento uses scopes to define the configuration. In the previous chapter, we used the frontend scope to set up the configuration for our custom module.

To modify the backend, we need to create a new scope in our configuration file called admin. Perform the following steps to do so:

  1. Open the config.xml file.

  2. Add the following code to the file located at app/code/local/Mdg/Giftregistry/etc/config.xml:

    <admin>
      <routers>
        <mdg_giftregistry>
          <use>admin</use>
            <args>
              <module>Mdg_Giftregistry_Adminhmtl</module>
              <frontName>giftregistry</frontName>
            </args>
        </mdg_giftregistry>
      </routers>
    </admin>

This code is very similar to the one we used before to specify our frontend route. However, by declaring the...