Вывод ресурсов по ТВ-полю(множественный выбор) через pdoResources
Здравствуйте, формумчане!
Не удается вывести ресурсы через pdoResources по ТВ-полю(множественный выбор)
Создал Тв-поле множественный выбор club_id
В параметрах ввода указал множественный выбор, а в возможных значениях следующий запрос:
Далее в чанке шаблона вывожу ресурсы следующей конструкцией:
Помогите, пожалуйста, разобраться в чем проблема.
Спасибо!
Не удается вывести ресурсы через pdoResources по ТВ-полю(множественный выбор)
Создал Тв-поле множественный выбор club_id
В параметрах ввода указал множественный выбор, а в возможных значениях следующий запрос:
@SELECT `pagetitle` AS `name`,`id` FROM `[[+PREFIX]]site_content` WHERE `parent`=10 AND `published` = 1 AND `deleted` = 0Параметры вывода разделите ","Далее в чанке шаблона вывожу ресурсы следующей конструкцией:
{'!pdoResources' | snippet : [
'tpl' => 'tpl.disciplineAnons',
'parents' => '0',
'limit' => 6,
'resources' => 'club_id',
'sortby' => '{"menuindex":"ASC"}',
'includeTVs' => 'imgAnons,menutitle,description',
'tvPrefix' => '',
'includeContent' => 1,
'showLog' => 0,
]}Но pdoResources выводит мне все ресуры вместо ресурсов у которых заполнено поле club_id.Помогите, пожалуйста, разобраться в чем проблема.
Спасибо!
Комментарии: 13
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
Указал как вы написали, но результат остался тот же.
По прежнему выводит все ресурсы.
Если вывести стандартно:
В шаблоне выводит 11,40,12,13
Попробуйте простой вызов:
Ну или так:
0.0000699: pdoTools loaded
0.0000181: xPDO query object created
0.0005860: Included list of tvs: imgAnons
0.0001318: leftJoined modTemplateVarResource as TVimganons
0.0001409: Added selection of modResource: `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `alias_visible`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `content`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
0.0000110: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `imgAnons`
0.0000129: Processed additional conditions
0.0001731: Added where condition: modResource.published=1, modResource.deleted=0
0.0000470: Replaced TV conditions
0.0001099: Sorted by modResource.menuindex, ASC
0.0000029: Limited to 6, offset 0
0.0001991: SQL prepared «SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`alias_visible`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, IFNULL(`TVimganons`.`value`, '') AS `imgAnons` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_site_tmplvar_contentvalues` `TVimganons` ON `TVimganons`.`contentid` = `modResource`.`id` AND `TVimganons`.`tmplvarid` = 38 WHERE ( `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 ) ORDER BY modResource.menuindex ASC LIMIT 6 „
0.0006561: SQL executed
0.0000429: Rows fetched
0.0220101: Could not process or prepare TV “menutitle»
0.0005019: Could not process or prepare TV «description»
0.0005071: Could not process or prepare TV «menutitle»
0.0004449: Could not process or prepare TV «description»
0.0004852: Could not process or prepare TV «menutitle»
0.0004458: Could not process or prepare TV «description»
0.0004151: Could not process or prepare TV «menutitle»
0.0004900: Could not process or prepare TV «description»
0.0004680: Could not process or prepare TV «menutitle»
0.0004761: Could not process or prepare TV «description»
0.0004299: Could not process or prepare TV «menutitle»
0.0004990: Could not process or prepare TV «description»
0.0271761: Prepared and processed TVs
0.0007229: Loaded «modChunk» with name «tpl.disciplineAnons»
0.0091741: Compiled Fenom chunk with name «modchunk/61»
0.0100689: Returning processed chunks
0.0395019: Total time
4 194 304: Memory usage