Book Image

Learning Drupal 6 Module Development

Book Image

Learning Drupal 6 Module Development

Overview of this book

Table of Contents (14 chapters)
Learning Drupal 6 Module Development
Credits
About the Author
About the Reviewers
Preface

Adding a Trigger


The trigger module is included with the base distribution of Drupal. However, it is not enabled by default. It must be enabled in Administer | Site building | Modules before it can be used.

Triggers provide a way of linking Drupal events to actions. Much of this chapter has been devoted to creating a new action. Now it is time to take this action and link it to an event.

Note

In this chapter we create the trigger through the administration interface. In the next chapter we will create a trigger in code.

The first thing to do is go to Administer | Site building | Triggers. Under the Content tab there should be drop-down boxes for every event that can be triggered:

For each available trigger, there is a drop-down list of actions that may be assigned to that trigger. If there are no actions for that trigger (as is the case with After deleting a post), then no drop-down list is displayed.

Note

A trigger causes an action to be executed when an event occurs. The above screen is used...