Usage
Revolution uses namespace paths to determine where to load third-party component files for custom manager pages, as well as manage custom language strings for those third-party components.
For example, if a namespace named “quip” has a path of “/www/modx/core/components/quip/”, then when a CMP is loaded from Action with a controller value of “index”, it will look for the index controller file in the namespace path, ie: “/www/modx/core/components/quip/index.php”. It will then be loaded in place of the custom manager page. A useful value for a controller in an action is “controllers/index”, so you can point it to “/www/modx/core/components/quip/controllers/index.php” (which is standard practice for addon paths in MODX).
Lexicons in Namespaces
Namespaces can be used to distinguish between lexicons and lexicon themes. For example, when loading a lexicon, you can specify the theme namespace before the theme name with a colon. For example, to load the “comment” theme for the “quip” namespace:
$modx->lexicon->load('quip:comment');
Assuming we are using English, the system will look for the lexicon/en/comment.inc.php file in the namespace path for Quip. This allows Lexicon themes to be loaded dynamically according to the namespace path, rather than requiring theme files to be placed in the core MODX directories.







