Jump to main content Jump to doc navigation
Note: Actions have been deprecated in 2.3, and will be removed in 3.0.

MODX Revolution introduces an entirely new program structure for its core. The manager is also built on what are called controllers and templates, which use AJAX processing to send data to connectors that access processors.

The controllers are simply PHP files that load the correct Smarty template to display, and fetch any pre-render data for the template. Revolution abstracts these controllers into the DB as modAction's, allowing 3rd party developers to easily create custom manager pages that 'hook' into the current MODX system without modifying the core.

modAction's require a controller and a template to exist, that must be found in the manager/controllers and manager/templates directories. They have a few certain parameters that are worth noting:

  • Controller - This points to the controller file. If the file is an index.php, you can leave that off and MODX will try and find it through a smart search.
  • Load Headers - if checked, this will load the MODX header and footer for the internal page. If you are wanting just a blank page for the manager page, leave this unchecked.
  • Language Topics - Language Topics are simply separations of language areas that allow for quicker i18n access. They can be found in the core/lexicon/en (or fr,de,etc) directory, and new topics can easily be created simply by using the Lexicon Management section.

For example, 3rd party devs might want to create a Lexicon Topic named 'buttons' for TinyMCE, which would reference the topic in core/components/tinymce/lexicon/en/buttons.inc.php. They can simply either A) use a build script to install the lexicon via a transport package, or B) have users import the lexicon topics using the Import Lexicon utility in Lexicon Management.

You can then load the topic via:

$modx->lexicon->load('tinymce:buttons');

modAction's are also easily hooked to modMenu's, which are abstract representations of the top menubar in the manager. Again, this lets 3rd party developers easily and quickly develop custom menu implementations for their components - or lets users rearrange the top menu.

These can all be managed via the Actions panel, which is found under the Tools menu.

Any changes to the order of 'core' menu items will be reverted during Revolution upgrades.

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Dannevang Digital
  • Sepia River Studios
  • Chris Fickling
  • CrewMark
  • deJaya
  • eydolan
  • Following Sea
  • Lefthandmedia
  • Murray Wood
  • Anton Tarasov
  • Stéphane Jäggi
  • Raffy
  • Snow Creative
  • Nick Clark
  • A. Moreno
  • JT Skaggs
  • Helen
  • YJ
  • krisznet
  • Richard
  • Yanni

Budget

$311 per month—let's make that $500!

Learn more