Hi all,
I have made a plugin 'OnDocFormSave' which saves necessary field values into a custom table to make filtering and searching a lot faster (where I have 500+ resources). I do also use this "index" table to generate my overview pages and for each entry there is also an image needed. So I have added a "image" field to my custom table and want it to be filled with the image path, of course...
Here is what I do in my plugin;
$imageTV = $modx->getObject('modTemplateVar', 10); // for me ID 10 is image TV
$imagePath = $imageTV->renderOutput($resource->get('id'));
The TV is binded to a media source which haves a relative path like "assets/uploads/images/". The value stored in $imagePath of above is the path relative to the media source path. But I want to include that path and thought renderOutput() will achieve this.. As "getResources" also uses this method when &processTVs=`1` is provided.
Can anyone get my point and help me a little further with this? Thanks in advance!
Regards, Bert