Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get all modDocuments (resources) with template id 2 (2 = 'Service')
- // This does not work
- $query = $modx->newQuery('modResource');
- $query->leftJoin('modTemplate', 'template');
- $query->where(array(
- 'template.templatename' => 'Service'
- ));
- $query->sortby('pagetitle', 'ASC');
- // This does work
- $query = $modx->newQuery('modResource');
- $query->where(array(
- 'template' => 2
- ));
- $query->sortby('pagetitle', 'ASC');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement