'element' => 'msProducts',
'depth' => 10,
'parents' => 0,
'tplPageWrapper' => 'pageWrapper',
'tplPageActive' => 'PageActive',
'tplPage' => 'Page',
'tplPageNext' => 'PageNext',
'tplPagePrev' => 'PagePrev',
'tplPageActive' => 'PageActive',
'maxLimit' => 20,
'limit' => 20,
'includeTVs'=>'discount',
'where' => [
'template' => 3
],
])}
находит все нужные страницы, а: {$_modx->runSnippet('!pdoPage', [
'element' => 'msProducts',
'depth' => 10,
'parents' => $_modx->resource.categoryToShow,
'tplPageWrapper' => 'pageWrapper',
'tplPageActive' => 'PageActive',
'tplPage' => 'Page',
'tplPageNext' => 'PageNext',
'tplPagePrev' => 'PagePrev',
'tplPageActive' => 'PageActive',
'maxLimit' => 20,
'limit' => 20,
'includeTVs'=>'discount',
'where' => [
'template' => 3
],
])}, где $_modx->resource.categoryToShow - выдает 5, 405 - не выводит ничего ?..
Включи и смотри что получается в запросе 'showLog' => 1
total rows = 0, но почему - никак не пойму
Не, я имею ввиду какой запрос SQL строится в этом вызове
0.0000520: pdoTools loaded 0.0000119: xPDO query object created 0.0001829: Included list of tvs: discount 0.0000861: leftJoined modTemplateVarResource as TVdiscount 0.0000949: Added selection of modResource: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `alias_visible`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `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.0000050: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `tv.discount` 0.0000088: Replaced TV conditions 0.0001740: Processed additional conditions 0.0002871: Added where condition: template=3, modResource.parent:IN(5,405), modResource.published=1, modResource.deleted=0 0.0000031: Replaced TV conditions 0.0000498: Sorted by modResource.publishedon, DESC 0.0000019: Limited to 20, offset 0 0.0001612: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `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`.`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(`TVdiscount`.`value`, '') AS `tv.discount` FROM `fFWtWu_site_content` AS `modResource` LEFT JOIN `fFWtWu_site_tmplvar_contentvalues` `TVdiscount` ON `TVdiscount`.`contentid` = `modResource`.`id` AND `TVdiscount`.`tmplvarid` = 12 WHERE ( `modResource`.`template` = 3 AND `modResource`.`parent` IN (5,405) AND `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 ) ORDER BY modResource.publishedon DESC LIMIT 20 " 0.0001001: SQL executed 0.0001001: Total rows: 0 0.0000041: Rows fetched 0.0000060: Prepared and processed TVs 0.0000029: Returning processed chunks 0.0012090: Total time 10 485 760: Memory usage
Обсуждают сегодня