On several occasions I’ve written about creating and using a Config page in MODx (Creating a User Config Page in Revo, Create a User Config Page in MODx & MODx Config Page, A Practical Example) which allows a developer to easily build some additional functionality into the MODx manager for use by an end user.
I continue to use the customized Config page for many of my projects and just thought I would share a few additional tips that we have been using in combination with this approach.
Using A Context
One of the annoying little issues with having a config page inside of the document tree was that there was no way to visually differentiate the configuration document from any other site document. One approach I have been taking is to create a “Configuration” context and I then place my “Settings” document within the new context. This allows for it to be visually separated from the other site documents and you can still retrieve the TVs with the getResourceField extra.
Adding Manager Menu Link*
In addition to using a second context I have been creating a new menu link in the manager navigation called “Settings” that takes the user directly to their settings document.
To do this create a directory called “settings” inside /core/components and place an index.php file in it with the code below. I am sure there is a more correct “MODx” statement for generating this url, so please share it in the comments section below. Note that you will need the correct document ID, mine is 1.
<?php header( 'Location: index.php?a=30&id=1' ) ; ?>
Next, create a Namespace called “settings” and enter the pathway to the document(s) above.
/var/www/vhosts/yourdomain/httpdocs/core/components/settings/
Finally to create the link in the menu go to System->Actions, you should see “settings”. Right click on it and choose “Create Action Here”. Enter “index” beside Controller and click save. Now, right click on the “Top Menu” and select “Create Menu”. I enter the Lexicon Key as “Settings”, Description as “Site Settings” and Action as “settings – index”.
For more detailed instructions on customizing the MODx manager I suggest going to Custom Manager Pages.
Login Redirect
I have also found it useful to redirect the user, on login, directly to the Settings document. To do this create a new plugin. I call mine, “loginRedirect” and paste the code below. Note that you will need the correct document ID, again mine is 1.
<?php
$modx->sendRedirect('manager/index.php?a=30&id=1');
return;
I then select the OnManagerLogin System Event and click save.
*NOTE: See the comment below from Zaigham that greatly simplifies the creation of this manager menu link.



