$did = $modx-resource-get('id');
$did = $resource-get('id');
This question has been answered by BobRay. See the first response.
// event OnWebPageComplete $modx->getOption('base_path') . 'some/path/' . $modx->resource->get('id') . '/';
$modx->resource->get('id')
$modx->resource
$this->modx->invokeEvent('OnDocFormSave', array( 'mode' => modSystemEvent::MODE_NEW, 'id' => $this->object->get('id'), 'resource' => &$this->object, 'reloadOnly' => $this->getProperty('reloadOnly',false), ));
First of all, I'm not sure if I'm getting what you are saying, but I just had a look in a plugin I wrote a few days ago, and there I have stuff like this:
// event OnWebPageComplete $modx->getOption('base_path') . 'some/path/' . $modx->resource->get('id') . '/';
obviously there is just that
$modx->resource->get('id')
like it's also used in snippets, so I don't see the problem you have there, maybe it's depending on the event? Not sure about that. When you have this problem, which event are we talking about?
What I recently noticed is that the available variables are not always correctly listed in the rtfm. For exampleis also available in OnWebPageComplete but the rtfm says under available variables "none", so first check what's written in the RTFM and then if you need it in an event where is written "none" try it anyway =P.$modx->resource