Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $where = $modx->newQuery('modResource');
- $where->leftJoin('modTemplateVarResource', 'TemplateVarResources');
- $where->leftJoin('modTemplateVar', 'tv', "tv.id=TemplateVarResources.tmplvarid");
- $where->limit(5); // Лимит
- $where->where(array(
- array(
- 'tv.name' => 'tags', // Имя TV
- 'TemplateVarResources.value' => 'modx', // Значение TV
- 'parent' => '1', // Родитель
- ),
- ));
- $resources = $modx->getCollection('modResource', $where);
- foreach ($resources as $key => $value) {
- }
Add Comment
Please, Sign In to add comment