We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    I’m trying to get all the resources where a given TV has a particular value. I can tell in the DB that the table I want to get at is modx_site_tmplvar_contentvalues. I need to get the contentid field (which is the id of the resource) from every row where tmplvarid=14 and value=’true’. But I don’t know how to write the xpdo. Is there an object type that corresponds to that table? Or do I need to do some sort of join?

      • 22303 MODX Staff
      • 10,725 Posts
      $tvrCollection = $modx->getCollection('modTemplateVarResource', array('tmplvarid' => 14, 'value' => "true"));