Ok here is the scenario;
I have a snippet that calls a random document, from that document I grab a piece of text and a thumbnail image using TV’s of course. Right now, they display in a shared div.
What I want to be able to do is place one or both of the results into a variable - almost like another TV, but not quite.
This way I can place the thumbnail in one spot, and the text in the other spot without having to do some insane CSS... Is this possible?
Thanks!
If I understand you correctly, it sounds like what you want to do is set a couple of
placeholders.
Does this help?
http://wiki.modxcms.com/index.php/API:setPlaceholder
Basically you just set the placeholders in your snippet, e.g.:
$modx->setPlaceholder(’jobtitle’,’Systems Engineer’);
and then in your template or content you insert [+jobtitle+] and that’s it.
Well... Ditto uses placeholders and PHx already, so maybe you could just template your Ditto output? That might be the easiest way to do what you need (see
http://ditto.modxcms.com/tutorials/phx-and-nested-tags.html for more info).