$resource->set('alias', 'Something here');
$resource->set('pagetitle', 'Some other stuff here'); $resource->set('longtitle', 'Some other stuff here'); $resource->set('description', 'Some other stuff here');
This question has been answered by BobRay. See the first response.
$resource->set('alias', ...
$resource->set('pagetitle', ...
$modx->regClientStartupHTMLBlock(' <script type="text/javascript"> Ext.override(MODx.panel.Resource, { originalSuccess: MODx.panel.Resource.prototype.success , success: function (o) { this.originalSuccess(o); var stageDateTv = document.getElementById("tv' . $stageDateTvId . '").value; var stagedResourceTv = document.getElementById("tv' . $stagedResourceTvId . '").value; if (!!stageDateTv && (!stagedResourceTv || !stagedResourceTv.length)) { var url = location.href, i = url.indexOf("?") + 3; MODx.loadPage(url.substr(i)); } } }); </script>');
Try OnDocFormSave end add ->save() to the end.
Maybe I'm being dense, but your question is not clear to me. Are you trying to update the display on the Manager page, the data in the database, or both?
MODX used two refresh the Manager page after the user saved the resource, but it you want to do that now, it's a little tricky. You have to hijack the save button with some JS code (credit to Gary Nutting):
...
It works for the alias, because the new alias is returned via the connector in the AJAX response from the resource/update processor. The pagetitle and longtitle are not returned.