Manager, Parser &amp; the Core - MODX Community Forums <![CDATA[Make Site site_start fixed URL]]>
We are trying to have a fixed url for our main page as we are trying to point out that it is about one country.
Unfortunately modx redirects immediately from to when the country page is set to site_start and is called.

So far we haven't really found a setting for disabling this.
Does anyone know how to disable this unwanted 301-redirect?
]]> Tue, 24 Apr 2018 09:28:58 +0000
<![CDATA[Support/Comments for CustomUrls]]>
You can build your patterns from resource fields, TV, snippets and output filters and set some constraints like you'd do with custom forms.

For example, with CustomURLs you can add the resource's ID or publish month in the aliases of all resources or just for ones whose parent = 1 or template = 1.

Pattern examples

Simple text :

Default MODx alias :

Resource placeholders :

TVs :

Snippets :
[[MySnippet? &id=`[[+id]]`]]

Output filters :

Default MODx URI :

More complex URI
[[+cu.parent_uri]]/some-text/[[getResourceField? &id=`[[+parent]]`]]/[[+id]]-[[+alias]]

Download :
Github :
Documentation :]]> Sat, 10 Feb 2018 02:04:54 +0000
<![CDATA[ClassExtender and Images]]> Fri, 13 Oct 2017 10:51:30 +0000 <![CDATA[Revolution Manager TV Customization - Howto show a TV on certain pages ONLY?]]>
maybe I miss something but I tried to make a tv visible on certain pages only and get to no result.
My first problem is to create a rule with a correct constraint to affect a certain page only. According to the docs I used the following params:

Action: core-resource/update
User Group: A certain user group of my installation

Field: tv9 (tv with id 9)
Containing Panel: modx-panel-resource
Rule: tv visible
Value: 0 (for testing to just hide it from that page to see if it works, should finally be 1 )

Constraint Class: modResource
Constraint Field: id
Constraint: 2 (page id 2)

The result is that the tv now is hidden from ALL pages. Seems my constraint settings are not working. Do I have entered the wrong values?

The second question is how to show the tv for certain pages (defined by id) only: Since all tvs are visible for all pages by default, I don’t think I can just set the rule-value to 1 for visibility, right? Thus, do I have to create a first rule that hides the tv from all pages first and then create a second rule to make it visible for the pages I like to have the tv visible?

Thx for help.]]> Tue, 11 Apr 2017 05:29:41 +0000
<![CDATA[Dynamic Depencency Listboxes]]>
I am fairly new to MODx and pretty desperate because i cannot find any working solution to my problem.

I have set up a Listbox(Multiple Choice) with some resources to choose from which i pull with this:
@EVAL return $modx->runSnippet('listResourcePagetitleInputOption', array('parent' => 99));

This works perfectly and lets me choose from the child-elements (100,101,102) of the parent resource with the id 99.

Resource structure:
- Special (99)
-- Option 1 (100)
--- Sub Option 1 (103)
--- Sub Option 1 (104)
-- Option 2 (101)
--- Sub Option 1 (105)
-- Option 3 (102)

Snippet-Code (listResourcePagetitleInputOption):
$parent = $modx->getOption('parent',$scriptProperties,0);
$parentObj = $modx->getObject('modResource',$parent);
if (!($parentObj instanceof modResource)) { return ''; }
$resArray = $parentObj->getMany('Children');
$resources = array();
foreach($resArray as $res) {
  if ($res instanceof modResource) {
    $resources[] = $res->get('pagetitle');
$out = implode("||",$resources);
return $out;

I am in need of a second Listbox which pulls the chosen id (for example id 100) of the first Listbox as his parent id (100) to get the child-elements with the ids 103 and 104 as a selectable option. Also it should be possible if i choose the Option 1 (100) and Option 2 (101) in the first Listbox, it should grab the children of all selected (103,104,105).

Is there a way to achieve this? Any help is greatly appreciated!

Thank you and best regards
Sascha]]> Wed, 15 Mar 2017 12:12:07 +0000
<![CDATA[Running custom PHP via a Namespace in the Top Menu to clear core/cache folder]]>
$dir = "/host/site/core/cache";
$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);
$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);
foreach ( $ri as $file ) {
    $file->isDir() ?  rmdir($file) : unlink($file);
return "Cache cleared.";

(I've moved the core folder outside public_html, so the path is correct.)

If I put the PHP in a file and access it directly at, it works fine, and the core/cache folder is empty until a page or the manager is loaded.

To make it more accessible I:
- put the contents inside core/components/clearcache/index.php file
- created a new Namespace called "clearcache" with a Core path of "{core_path}components/clearcache/"
- created a new Top Menu item with an Action of "index" and a Namespace of "clearcache"

When I click on the new menu item, it returns "Cache cleared", however, the core/cache folder isn't empty. Is this because clicking on the menu item and loading the new page actively caches new content, or is there something in my PHP Modx doesn't like?

I'm running:
Modx Revolution 2.5.2-pl
PHP 5.5.38]]> Sat, 11 Mar 2017 07:44:42 +0000
<![CDATA[Snippets execute in wrong order when pdoTools is installed]]>
The Placeholder value is set by a snippet eg. [[regFile? &item=`file1`]]. Each time the snippet is called the value passed by &item is concatenated to the previous value and stored in the placeholder.

Calling [[regFile? &item=`file1,file3`]] then calling [[regFile? &item=`file7`]] results in [[+myPlaceholder]] being set to: file1,file3,file7

So far so good.

At the end of my Template a second snippet [[outputScripts]] is called. It parses myPlaceholder and returns an HTML block with script tags based on the files stored in the Placeholder eg.

<script src="file1.js"></script>
<script src="file3.js"></script>
<script src="file7.js"></script>

However when placed at the end of my Template it returns

<script src="file1.js"></script>
<script src="file3.js"></script>

If I change the [[regFile]] snippet to output the current Placeholder value each time it is called the Placeholder value is correct, after the second call the 3 .js files are included.

If both snippets also output the current microtime() you can see that [[outputScripts]] is called before [[regFile]] even though [[outputScripts]] is the last tag in my Template. To illustrate:

0.624 [[regFile]]
0.911 [[regFile]]
0.896 [[outputScripts]] <<< this should be the 3rd event but the timer shows it is the 2nd.

I don't know why but calling [[!outputScripts]] uncached while pdoTools is installed also resolves the issue.

Changing the System Setting for pdotools_fenom_default to No has no effect (I don't think it should though, I think this relates to the way pdoTools snippets handle Chunks).

Disabling the pdoTools Plugin has no effect.

Can anyone suggest what might be the cause or how I can investigate further?

The issue seems vaguely similar to the Placeholder issue which was influenced by pdoTools reported at]]> Sat, 04 Mar 2017 05:38:36 +0000
<![CDATA[Resources Toolbar has disappeared.]]>
Please help!!

]]> Mon, 21 Nov 2016 09:17:20 +0000
<![CDATA[Items going missing from a MIGX TV grid]]>
I have a really simple MIGX TV, used to store members of a team. When adding data it displays fine in the manager and on the front end, but when you refresh the manager page some items from the grid are missing, though they're showing up in the raw json in the db. Nothing in the error log. Here's the json for the tv setup. Any ideas what could be going wrong?

Thank you!

"caption":"ID of page to link to",
}]]> Mon, 22 Aug 2016 03:34:21 +0000
<![CDATA[We need better cache clearing control]]>
1. Installing a new plugin clears the cache. Why??? I haven't even used the plugin yet, and maybe it's just to add some scripting ability that I haven't even put in a page yet, and even so I would just need to save that page and clear the cache just for that page.

2. Creating a new page automatically checks off the "clear cache" checkbox, even if I haven't set that page to be published yet. Once again, what's the point until it's published? I'd like to see an option in CacheMaster to disable this on new documents.

3. The Publish and Unpublish buttons in the list views of plugins like Articles and Collections clear the cache.

4. Right-clicking on a resource in the tree and selecting Publish or Unpublish or Delete, and also using the Quick Edit option here, clear the cache.

I'm sure there are other times the cache gets cleared automatically. It drives me nuts.

1. I'd love to see a system setting that makes it an option to NEVER clear the site cache no matter what happens, so that the cache only gets cleared by selecting Clear Cache in the MODX menus.

2. I'd love to see an option to designate a certain area of the site as an "archive", so that the site cache for these files never gets cleared, even when selecting Clear Cache from the MODX menus. Maybe selecting that would bring up an option to include or exclude pages in the archive. I have one site that's fairly small except for one section that has tons of old articles available, and after a site clearing, whenever a search engine hits this site for reindexing, all those thousands of articles have to be needlessly reacreated all over again.

I know there are other cache-related plugins available, but I don't think they address these problems.]]> Thu, 18 Aug 2016 12:51:21 +0000
<![CDATA[Initial blank value appended to @SELECT Binding]]>
Here’s the code pasted into the "Input Option Values":

@EVAL return substr($modx->runSnippet('Ditto', array("parents"=>"984","depth"=>"1","display"=>"all","showInMenuOnly"=>"0","sortBy"=>"pagetitle","sortDir"=>"ASC", "tpl"=>"@CODE ||[+pagetitle+]==[+id+]")), 2);

Here’s the generated list in the TV:

<select id="tvcontainsPatterns[]" size="8" onchange="documentDirty=true;" multiple="multiple" name="tvcontainsPatterns[]">
<option value="1069">Ads — Monetization</option>
<option value="1084">Article Feature Section — Multi-Link</option>
<option value="1085">Article Feature Section — Single-Link</option>
<option value="878">Banner — Godzillatron</option>
<option value="1066">Banner — Moodboard</option>
<option value="1048">Banner — Pokemontron</option>
<option value="1079">Bio Layout — Additional Links</option>

And, this is what I’m looking for (note the second line):

<select id="tvcontainsPatterns[]" size="8" onchange="documentDirty=true;" multiple="multiple" name="tvcontainsPatterns[]">
<option value=""></option>
<option value="1069">Ads — Monetization</option>
<option value="1084">Article Feature Section — Multi-Link</option>
<option value="1085">Article Feature Section — Single-Link</option>
<option value="878">Banner — Godzillatron</option>
<option value="1066">Banner — Moodboard</option>
<option value="1048">Banner — Pokemontron</option>
<option value="1079">Bio Layout — Additional Links</option>

I’m sure I could could easily hack it w/ a javascript "clear" button that would deselect all selected values, but I’d like a more elegant solution if possible.

Thanks!]]> Fri, 30 Oct 2015 08:54:56 +0000
<![CDATA[CacheMaster 1.2.2 not working on TVs, plugins, etc.]]> Mon, 17 Aug 2015 10:03:46 +0000 <![CDATA[Possibility to set a default content for pages directly in the manager]]>
I'm developing a website on MODx Evolution where many pages are activities.
The top-level pages using Ditto to display summaries of the miscellaneous activities, which are set in the "introtext" field.

Each activity can have a longer "learn-more" text, which is is set in the content field and should be display on the activity page.
Because most of the "Learn more" texts were not written yet, it would be very useful if MODx had some feature to set a default value for the [*content*] field.
For instance, the content could be set to something like:

Exactly like the default value for TVs.

This "Default content" field could typically be integrated to the MODx Configuration section of the manager.

Alternatively, is there some plugin to achieve this ?
Something more straightforward than ManagerManager?

I want as much as possible avoiding to create a new template, because this means twice more work when you change something in a template.]]> Mon, 08 Jun 2015 01:25:57 +0000
<![CDATA[change migx value with ondocformsave plugin]]>
i'd like to get links to preview images of vimeo with curl (works as snippet)
Now i need to get the migx parsed and on save and foreach row the url filled with the response from the curl calls.

when i do this at runtime it slows down the site massive because of alot api requests and slow responses, thats the reason why i like to make this only once at savetime.]]> Sat, 21 Mar 2015 06:52:12 +0000
<![CDATA[CacheMaster V. 1.1.0-pl Released]]>
On a large site, MODX's default behavior of clearing the cache for all Resources whenever you save a Resource or Element can really slow things down for your visitors. The CacheMaster Plugin for MODX Revolution allows you to have the cache cleared for a single Resource or Element when you save it, without clearing anything else.

It will also, optionally, uncheck the "Empty Cache" checkbox by default when you edit a Resource or Element.]]> Wed, 18 Mar 2015 02:57:21 +0000
<![CDATA[Display custom database table in custum manager page]]> tutorial and everythink is working fine. I can display items from my custom table on the page.
The problem is to display them in Manager. I created my own manager page like it is on this page and i can display on this page static text. Now i want to get on this manager page, my custom table items. I thought i can acces them by
but it's giving me blank page.
Custom manager page is in sam path as bobs snippet (core/components/quotes/).
How can I get this custom table?

Edit: my MODx version is 2.3.3]]> Tue, 03 Feb 2015 07:51:44 +0000
<![CDATA[Messages to other backend users]]> Fri, 30 Jan 2015 02:10:17 +0000 <![CDATA[Package Manager: grid columns not sortable]]> (MODX 2.3.2-pl)

It's the same with the table of Messages.]]> Tue, 27 Jan 2015 05:52:17 +0000
<![CDATA[Manager Menu items]]> Wed, 21 Jan 2015 04:04:18 +0000 <![CDATA[Saving Resources and Chrome]]>
I'm hoping this isn't a post which has already been logged. I recently upgraded my Modx install to 2.3.0 and then 2.3.1. One thing I've noticed within Chrome and using the manager is that when I try to save resources in Chrome it just sits with the window "Please Wait... Saving..." which never seems to refresh even though it does seems to save what has been done. Is there a fix for this at all.


Graham]]> Thu, 31 Jul 2014 03:57:17 +0000