I’m still having trouble with this... The general question here, I guess, is how do you refer to the current document’s id within a TV?
I managed to get something like this to work in evolution, but I’m having trouble with a Revolution version.
What if I need the current document’s children with a certain template number to appear in a TV? I tried with the snippet above...
Can it be done with a @SELECT statement?
I mean - something like: (TV Input Option Values)
@SELECT modx_site_content.pagetitle as artist, modx_site_content.id as artistid FROM modx_site_content WHERE modx_site_content.template = 7 AND modx_site_content.parent = $_GET['id'] ORDER BY modx_site_content.menuindex)
This doesn’t work in my case. Take the
AND modx_site_content.parent = $_GET['id']
clause out and it works, only I have a dropdown with all the site’s docs with template = 7...
Would love some help from someone, I’ve spent hours trying to figure this one out
Closest thing I found was in
http://modxcms.com/forums/index.php/topic,26826.0.html, but, again, replacing the ’7’ in
@eval global $modx; $childArr = $modx->getDocumentChildren(7); foreach($childArr as $child){$opArr[]=$child['pagetitle']."==".$child['id'];} return $opArr;
with
doesn’t work...