Modx light document tree

While moving Money Terms to Modx CMS, I found that, though Modx is otherwise quite wonderful, the manager (admin interface) was painfully slow, and my (shared) server could not cope with the load it created. The main problem was the extremely heavy document tree that the manager displays, I was forced into finding a solution.

I discovered the problem only when I was ready to move the site from my test system to the production server. This meant I had to choose between switching to another CMS, living with the problem, or fixing it.

My solution was to replace the document tree with something lighter. Fortunately the ModX Wayfinder snippet provides an alternative way of generating a document tree. Together with the Ditto snippet and a database query it provides a usable alternative.

There are a number of problems with my solution:

  • There is no context menu on the document tree.
  • Unpublished pages are not displayed differently in the tree, but are listed (again) underneath it.
  • Deleted pages are not shown in the tree, but listed beneath the unpublished pages.
  • Clicking on a deleted page in the tree undeletes it without asking for confirmation.
  • The document tree does not refresh when you make changes. You have to reload the frame manually (most
  • There may be a few problems. The only bug I have discovered is the occasional Ditto error when displaying the tree on my production server (not reproducible on my test setup!).

Given all this I suggest you only use this if the current document tree is causes you unacceptable problems. Although I do not expect to find anymore bugs, I do not take any responsibility for bugs or other problems with this: use at your own risk. It is meant to be a simple hack to allow people in similar circumstances to mine to use Modx until we get the improved manager promised for version 0.9.7.

Assuming you still want to use this, installation is as follows:

  1. Download and on uncompress the files. Gzip archive here, zip archive here. The files are all GPL licensed.
  2. Take backup copies of assets/snippets/wayfinder/wayfinder.inc.php and manager/frames/1.php.
  3. Apply Pixelchutes’ patch to allow Wayfinder to show unpublished documents. The download archive includes an already patched copy of wayfinder.inc.php that you can copy to assets/snippets/wayfinder/wayfinder.inc.php, but you still need to add one line to the snippet in the manager.
  4. Copy 1.php and lighttree.php to manager/frames/.

You may need to logout of the manager and login again to see the new tree.

Please let me know of any bugs, or simply whether this works for you or not. Either leave a comment below or email me.

Leave a Reply

Your email address will not be published. Required fields are marked *