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

Displaying an alert in the CMS Admin from a module

In one of the previous recipes, we have seen how to save important messages from a module to the Admin Log. Sometimes, however, we may need to actively communicate important messages to the administrator.

This recipe demonstrates how to place a message on the Admin alert queue.

How to do it...

  1. Using any of the methods described in Chapter 4, Getting Started with Modules create a new plug-in type module stub for your Store Inventory Manager module, and call it "StoreManager".
  2. Open "method.install.php" in your editor (or create a new install file), and add the following lines:
    $db = $gCms->GetDb(); $dict = NewDataDictionary( $db ); $flds = " item_id I KEY, title C(80), description X, inventory I"; ...

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