Controllers and Menus
Last updated Oct 12th, 2026 | Page history | Improve this page | Report an issue
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
Budget
$194 per month—let's make that $500!
Learn moreServer-side, Controllers fetch data, register assets, and load the Smarty templates that hold the bare markup; ExtJS renders the interface in the browser. AJAX calls go to a Connector (usually /connectors/index.php), which routes the request's action to a Processor that loads or changes data.
A controller is identified by namespace + action from the URL: the a parameter carries the action (read server-side from $_REQUEST), and namespace defaults to core. Core controllers and templates live in /manager/; extras keep theirs in their namespace directory under core/components/.
How an action resolves to a controller¶
Given ?a=some/action&namespace=mycomponent, the manager looks for the controller in this order (modManagerResponse::getControllerClassName()):
- PSR-4 class
\MODX\Revolution\Controllers\Some\Action— if it exists, no file is loaded; preferred way in 3.x and available to extras. - Legacy global class
<Namespace><Action>ManagerController, e.g.MycomponentSomeActionManagerController(namespace and action split on/, each part ucfirst'd). - File
controllers/some/action.class.php. - File
controllers/some/action/index.class.php.
If no class matches, the file is looked up under controllers/ in this order: the active theme folder, default/, then the namespace root. Nothing found — the manager throws a not-found exception. Menu permissions (modMenu.permissions) are checked before the controller runs — see Menus.
Related Pages¶
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
Budget
$194 per month—let's make that $500!
Learn more










