hey,
im trying to get a query WITH the related TV's but i have no idea any more after thousands of trys..
I have a TV with Name: Presentation Time
and i want to sort my Ressources by this TV is this possible?
My Try:
$c = $modx -> newQuery('modResource');
$c -> where(array('parent:IN' => array($parent_ressource), 'deleted' => false, 'hidemenu' => false, 'published' => true, ));
$c->sortby('Presentation Time','ASC');
$resources = $modx -> getCollection('modResource', $c);
But it comes up following message
Notice: Undefined variable: locations in C:\xampp\htdocs\modx\core\cache\includes\elements\modsnippet\18.include.cache.php on line 32
Warning: array_unique() expects parameter 1 to be array, null given in C:\xampp\htdocs\modx\core\cache\includes\elements\modsnippet\18.include.cache.php on line 32
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\modx\core\cache\includes\elements\modsnippet\18.include.cache.php on line 36
Notice: Undefined variable: rest in C:\xampp\htdocs\modx\core\cache\includes\elements\modsnippet\18.include.cache.php on line 61
and this looks like the TV's are not in this Query included, right? I just can get the values of them by getTVValue and this works. But is it possible to integrate the TV's in the Query to Sort by them?
regards
Lucas