O'Reilly logo

CMS Made Simple Development Cookbook by Samuel Goldstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an admin panel for your module

Before you can create an elaborate tabbed admin-side panel with forms and other feedback mechanisms, you need to take the basic step of creating an admin panel in the first place. The CMS Made Simple module API provides a number of methods for this purpose.

This recipe introduces the steps required to create an admin panel.

How to do it...

  1. Using any of the methods described in Chapter 4, Getting Started with Modules create a new plugin type module stub for your Gift List Registry module, and call it "GiftList".
  2. Using your favorite editor, add the following method to GiftList.module.php:
    function HasAdmin()
    {
    return true;
    }
    
  3. Create a new file in your editor, and type in the following:
    <?php if (!isset($gCms)) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required