Hi,
i have a resource which builds a json object for some ajax action. for this the resource collects data from other resources, which generally works just fine. but in the process i need this resource to get another resources processed output. i’m doing it like this:
$otherResource = $modx->getObject('modResource', $someID );
$jsonObj['html'] = $otherResource->process();
this actually does some processing, but it’s doing it wrong (at least not as i want it to).
the other resource has a template kinda like this:
<div id="no[[*id]]">[[*myTemplateVar]]</div>
the *id gets filled with the id of the resource
calling the process-method. the TV of course gets nothing. so, the data used for processing that other resource is the calling resource’s, not of the one that’s being called.
so, my first question: is the process()-method the correct one or do i need to use something else?
and secondly: if it’s correct, what am i doing wrong.
thanks
marc