По логике он должен формировать условие для запроса со всеми исключениями и далее уже разбираться с полученным документами.
Именно так и работает pdoMenu.
[[!pdoMenu? &parents=`2` &level=`2` &showLog=`1` &checkPermissions=`list` ]]
На сайте с 17000 товаров выдаёт вот такой лог работы:
0.0056009: pdoTools loaded 0.0000551: xPDO query object created 0.0007398: Added selection of modResource: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `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.0032482: Processed additional conditions 0.0037792: Added where condition: modResource.parent:IN(2,12,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29), modResource.published=1, modResource.hidemenu=0, modResource.deleted=0, modResource.context_key=web 0.0001431: Sorted by modResource.menuindex, ASC 0.0004220: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `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` FROM `modx_site_content` AS `modResource` WHERE ( `modResource`.`parent` IN (2,12,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29) AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 AND `modResource`.`deleted` = 0 AND `modResource`.`context_key` = 'web' ) ORDER BY modResource.menuindex ASC " 0.0041840: SQL executed 0.0001559: Total rows: 384 0.0030110: Rows fetched 0.1772320: Checked for permissions "list" 0.0100720: Returning raw data 0.0012240: Tree was built 0.0005331: Start template tree 0.0042419: Created inline chunk with name "ad22a6773e8643db35baf6e56fa79c5d" 0.0067301: Created inline chunk with name "dc6d3757597108f87f958f868cf1591a" 1.3126249: End template tree 1.5312409: Total time 31 981 568: Memory usage

Вернуться к списку комментариев