-
MODX Staff
- 10,725 Posts
What is not working? Is the database not changing? Or are you not seeing the change after clearing the cache?
I'm not getting anything, I don't even get the return. Just a blank page. Checked DB and this doesn't change
I'm using revo 2.1.5
Try this:
<?php
$resource = $modx->getObject('modResource', 22);
if (! $resource) {
return '<p>Could not find resource 22</p>';
}
$resource->set('isfolder', 1);
$resource->save();
return '<p>The resource is now a folder</p>';
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html
Thanks Bob, thats done the trick. Any idea wasn't the other way working, i'd actually tried my first way on another 2.1.5 fresh instal on same local server and it worked fine.
Thanks again
Ok ran the above and seems to of worked fine.