Hi, I'm trying to get a resource in a snippet based on a TV value ... below the $query works & is what I am trying to replicate with the xPDO syntax - though I'm just not sure how to do it ~or~ if the TV values are already a part of the modResource collection I have already pulled... [if so, how can I access the TV values?]
$query = "SELECT tvs.*, tvv.*, sc.*
FROM modx_site_tmplvar_contentvalues tvv
left join modx_site_tmplvars tvs
on tvs.id = tvv.tmplvarid
left join modx_site_content sc on sc.id = tvv.contentid
where tvs.name = 'DoorsOpen'
and tvv.value like '2012-06-20%';";
$today = date('Y-m-d');
$crit = array(
'published' => 1,
'parent' => 24
);
$documents = $modx->getCollection('modResource', array('modTemplateVar'=>array()), $crit);
foreach($documents as $document){
echo $document->get('pagetitle');
}
any help?
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525