-
☆ A M B ☆
- 2,475 Posts
I'm pretty familiar with creating CMPs: you create a namespace, then you create an action, and you add that action to a menu.
However, I'm confused by the core actions. E.g. let's look at the action that kicks off the page that lists content types: "system/contenttype". If this were any other namespace, we would expect a file with a .php function to be where the action had defined it within its namespace. In other words CORE + CONTROLLER + .php. But with core actions, we find that they are not in the core folder at all... they aren't even entirely in the connectors folder either. In our example, connectors/system/contenttype.php is responsible for only part of what happens on that page... if you comment out its contents, the basic page is still drawn, but the contents of the grid are not populated.
Things seem to be fired off from the manager/controllers/default/system/contenttype.class.php, but that location makes even less sense to me. Why there? Why the "default"?
What's going on there? Why is this layer obscured? Where is this being obscured?
-
MODX Staff
- 10,725 Posts
Connectors are used for the AJAX requests to core processors, and are organized by the path to the connector. These are generally called by the Controllers. You can see the calls from the page loaded by a Controller to various Connectors. Actions can be created to handle and process these AJAX requests by themselves. See Site --> Clear Cache for an example.
Controllers, are organized by theme (default), then the path, and are essentially responsible for generating the manager pages.