Skip to content

Instantly share code, notes, and snippets.

@avoronkin
Created March 22, 2011 09:30
Show Gist options
  • Save avoronkin/880984 to your computer and use it in GitHub Desktop.
Save avoronkin/880984 to your computer and use it in GitHub Desktop.
Multiple TV searching via xPDO
<?php
//http://modxcms.com/forums/index.php?topic=58644.msg354702#msg354702
$query->where(array(
array(
'id:IN' => $children_of_this_folder,
'published' => true,
'deleted' => false,
'hidemenu' => false,
'isfolder' => false,
),
array(
array(
'TemplateVar.name' => 'tv1',
'TemplateVarResources.value' => 'something',
),
array(
'TemplateVar.name' => 'tv2',
'TemplateVarResources.value:!=' => 'something else'
)
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment