O'Reilly logo

MODx Web Development by Antano Solar John

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

Chapter 13. Plugins and Modules

This chapter explains plugins and modules, including those that we have used in our application. This chapter also covers events and plugin configuration.

Plugins and events

Plugins are PHP code blocks in MODx that, unlike snippets, are not called for execution from a resource or a template. Rather, plugins are executed on the triggering of certain events, when a resource is parsed, or during other internal processing. Every action in MODx, such as rendering a resource, or deleting a user from the system, will trigger a series of flags. Each flag is viewed as an event. For example, you have events such as:

  • OnDocFormPrerender—triggered just before the resource is going to be rendered
  • OnUserFormSave—triggered just before ...

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