Tickets сортировка по просмотрам
В сообществе не нашел, оставлю может кому-то по запросу пригодится.
&sortby=`views`
&select=`{"View":"COUNT(DISTINCT View.uid) as views"}`
&leftJoin=`{"View":{"class":"TicketView","alias":"View","on":"Ticket.id=View.parent"}}`
Комментарии: 9
Всякие такие штуки полезно было бы сразу в примеры документации добавлять.
Ну они же элементарные. Если не понятно что тут происходит то значит есть сложности с составлением запросов к БД.
Этот код может прилично тормозить на большом количестве документов, просто потому, что нужно соединить много-много строк.
Поэтому его должен писать тот, кто понимает, что делает, а не просто копипастит с примеров.
Между прочим, в старых версиях тикетов такие джоины были сразу в стандартном сниппете, а потом пропали — из-за проблем с производительностью.
Поэтому его должен писать тот, кто понимает, что делает, а не просто копипастит с примеров.
Между прочим, в старых версиях тикетов такие джоины были сразу в стандартном сниппете, а потом пропали — из-за проблем с производительностью.
Заметил, что данный вывод (просто копипастит с примеров) странно сортирует. Например, страница с 199 просмотрами в списке выше чем страница с 4521. Однако в настройках у меня стоит: Считать просмотры страниц гостями (tickets.count_guests) ->Да Возможно идет учет просмотров только авторизованными пользователями (то есть только меня)?
Блок популярных статей хорошо кликают пользователи, а альтернативы сортировки тикетов по просмотрам я пока не нашел.
Блок популярных статей хорошо кликают пользователи, а альтернативы сортировки тикетов по просмотрам я пока не нашел.
Кто знает почему сортировка может неверно отрабатывать? Вот пример сортировка по просмотрам по убыванию:
707,758,702,608,268,261,699,228,856
Лог
707,758,702,608,268,261,699,228,856
Лог
0.0001590: Query parameters are prepared.
0.0000389: xPDO query object created
0.0001910: leftJoined TicketsSection as Section
0.0001500: leftJoined modUser as User
0.0001700: leftJoined modUserProfile as Profile
0.0004919: leftJoined TicketVote as Vote
0.0004439: leftJoined TicketStar as Star
0.0004671: leftJoined TicketView as View
0.0000041: Grouped by Ticket.id
0.0000641: Added selection of TicketsSection: SQL_CALC_FOUND_ROWS `id` AS `section.id`, `type` AS `section.type`, `contentType` AS `section.contentType`, `pagetitle` AS `section.pagetitle`, `longtitle` AS `section.longtitle`, `description` AS `section.description`, `alias` AS `section.alias`, `link_attributes` AS `section.link_attributes`, `published` AS `section.published`, `pub_date` AS `section.pub_date`, `unpub_date` AS `section.unpub_date`, `parent` AS `section.parent`, `isfolder` AS `section.isfolder`, `introtext` AS `section.introtext`, `richtext` AS `section.richtext`, `template` AS `section.template`, `menuindex` AS `section.menuindex`, `searchable` AS `section.searchable`, `cacheable` AS `section.cacheable`, `createdby` AS `section.createdby`, `createdon` AS `section.createdon`, `editedby` AS `section.editedby`, `editedon` AS `section.editedon`, `deleted` AS `section.deleted`, `deletedon` AS `section.deletedon`, `deletedby` AS `section.deletedby`, `publishedon` AS `section.publishedon`, `publishedby` AS `section.publishedby`, `menutitle` AS `section.menutitle`, `donthit` AS `section.donthit`, `privateweb` AS `section.privateweb`, `privatemgr` AS `section.privatemgr`, `content_dispo` AS `section.content_dispo`, `hidemenu` AS `section.hidemenu`, `class_key` AS `section.class_key`, `context_key` AS `section.context_key`, `content_type` AS `section.content_type`, `uri` AS `section.uri`, `uri_override` AS `section.uri_override`, `hide_children_in_tree` AS `section.hide_children_in_tree`, `show_in_tree` AS `section.show_in_tree`, `properties` AS `section.properties`
0.0000160: Added selection of modUser: `username`
0.0000272: Added selection of modUserProfile: `internalKey`, `fullname`, `email`, `phone`, `mobilephone`, `blocked`, `blockeduntil`, `blockedafter`, `logincount`, `lastlogin`, `thislogin`, `failedlogincount`, `sessionid`, `dob`, `gender`, `address`, `country`, `city`, `state`, `zip`, `fax`, `photo`, `comment`, `website`, `extended`
0.0001359: Added selection of Ticket: `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.0000188: Added selection of TicketVote: `value` as `vote`
0.0000792: Added selection of TicketStar: COUNT(`id`) as `star`
0.0000420: Added selection of TicketView: COUNT(View.parent) as views
0.0023339: Processed additional conditions
0.0026202: Added where condition: class_key=Ticket, Ticket.parent:IN(11,176,49632,49920,49921,50126,49628,49672,49673,49674,49676,49677,49678,49679,49680,49712,49848,49908,50038,50065,50192,49681,49682,49683,49684,49685,49686,49689,49690,49691,49693,49694,49695,49696,49697,49698,49699,49700,49701,49702,49704,49705,49706,49707,49709,49710,49711,49722,49723,49727,49728,49731,49733,49737,49738,49740,49741,49744,49745,49746,49749,49750,49751,49752,49753,49754,49756,49757,49778,49780,49790,49796,49801,49802,49803,49804,49805,49808,49843,49849,49851,49854,49855,49856,49860,49861,49864,49875,49876,49878,49844,49850,49845,49846,49847,49909,49910,49912,49919,49927,49931,49937,49948,49964,49993,50006,50008,49907,50039,50040,50043,50060,50025,50066,50073,50074,50086,50100,50101,50102,50123,50125,50142,50193,50197,50211,50214,50128,50129), Ticket.published=1, Ticket.deleted=0
0.0000479: Sorted by views, DESC
0.0000050: Limited to 9, offset 0
0.0004919: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `Section`.`id` AS `section.id`, `Section`.`type` AS `section.type`, `Section`.`contentType` AS `section.contentType`, `Section`.`pagetitle` AS `section.pagetitle`, `Section`.`longtitle` AS `section.longtitle`, `Section`.`description` AS `section.description`, `Section`.`alias` AS `section.alias`, `Section`.`link_attributes` AS `section.link_attributes`, `Section`.`published` AS `section.published`, `Section`.`pub_date` AS `section.pub_date`, `Section`.`unpub_date` AS `section.unpub_date`, `Section`.`parent` AS `section.parent`, `Section`.`isfolder` AS `section.isfolder`, `Section`.`introtext` AS `section.introtext`, `Section`.`richtext` AS `section.richtext`, `Section`.`template` AS `section.template`, `Section`.`menuindex` AS `section.menuindex`, `Section`.`searchable` AS `section.searchable`, `Section`.`cacheable` AS `section.cacheable`, `Section`.`createdby` AS `section.createdby`, `Section`.`createdon` AS `section.createdon`, `Section`.`editedby` AS `section.editedby`, `Section`.`editedon` AS `section.editedon`, `Section`.`deleted` AS `section.deleted`, `Section`.`deletedon` AS `section.deletedon`, `Section`.`deletedby` AS `section.deletedby`, `Section`.`publishedon` AS `section.publishedon`, `Section`.`publishedby` AS `section.publishedby`, `Section`.`menutitle` AS `section.menutitle`, `Section`.`donthit` AS `section.donthit`, `Section`.`privateweb` AS `section.privateweb`, `Section`.`privatemgr` AS `section.privatemgr`, `Section`.`content_dispo` AS `section.content_dispo`, `Section`.`hidemenu` AS `section.hidemenu`, `Section`.`class_key` AS `section.class_key`, `Section`.`context_key` AS `section.context_key`, `Section`.`content_type` AS `section.content_type`, `Section`.`uri` AS `section.uri`, `Section`.`uri_override` AS `section.uri_override`, `Section`.`hide_children_in_tree` AS `section.hide_children_in_tree`, `Section`.`show_in_tree` AS `section.show_in_tree`, `Section`.`properties` AS `section.properties`, `User`.`username`, `Profile`.`internalKey`, `Profile`.`fullname`, `Profile`.`email`, `Profile`.`phone`, `Profile`.`mobilephone`, `Profile`.`blocked`, `Profile`.`blockeduntil`, `Profile`.`blockedafter`, `Profile`.`logincount`, `Profile`.`lastlogin`, `Profile`.`thislogin`, `Profile`.`failedlogincount`, `Profile`.`sessionid`, `Profile`.`dob`, `Profile`.`gender`, `Profile`.`address`, `Profile`.`country`, `Profile`.`city`, `Profile`.`state`, `Profile`.`zip`, `Profile`.`fax`, `Profile`.`photo`, `Profile`.`comment`, `Profile`.`website`, `Profile`.`extended`, `Ticket`.`id`, `Ticket`.`type`, `Ticket`.`contentType`, `Ticket`.`pagetitle`, `Ticket`.`longtitle`, `Ticket`.`description`, `Ticket`.`alias`, `Ticket`.`link_attributes`, `Ticket`.`published`, `Ticket`.`pub_date`, `Ticket`.`unpub_date`, `Ticket`.`parent`, `Ticket`.`isfolder`, `Ticket`.`introtext`, `Ticket`.`content`, `Ticket`.`richtext`, `Ticket`.`template`, `Ticket`.`menuindex`, `Ticket`.`searchable`, `Ticket`.`cacheable`, `Ticket`.`createdby`, `Ticket`.`createdon`, `Ticket`.`editedby`, `Ticket`.`editedon`, `Ticket`.`deleted`, `Ticket`.`deletedon`, `Ticket`.`deletedby`, `Ticket`.`publishedon`, `Ticket`.`publishedby`, `Ticket`.`menutitle`, `Ticket`.`donthit`, `Ticket`.`privateweb`, `Ticket`.`privatemgr`, `Ticket`.`content_dispo`, `Ticket`.`hidemenu`, `Ticket`.`class_key`, `Ticket`.`context_key`, `Ticket`.`content_type`, `Ticket`.`uri`, `Ticket`.`uri_override`, `Ticket`.`hide_children_in_tree`, `Ticket`.`show_in_tree`, `Ticket`.`properties`, `Vote`.`value` as `vote`, COUNT(`Star`.`id`) as `star`, COUNT(View.parent) as views FROM `modx_site_content` AS `Ticket` LEFT JOIN `modx_site_content` `Section` ON `Section`.`id` = `Ticket`.`parent` LEFT JOIN `modx_users` `User` ON `User`.`id` = `Ticket`.`createdby` LEFT JOIN `modx_user_attributes` `Profile` ON `Profile`.`internalKey` = `User`.`id` LEFT JOIN `modx_tickets_votes` `Vote` ON `Vote`.`id` = `Ticket`.`id` AND `Vote`.`class` = "Ticket" AND `Vote`.`createdby` = 1 LEFT JOIN `modx_tickets_stars` `Star` ON `Star`.`id` = `Ticket`.`id` AND `Star`.`class` = "Ticket" AND `Star`.`createdby` = 1 LEFT JOIN `modx_tickets_views` `View` ON Ticket.id = View.parent WHERE ( `Ticket`.`class_key` = 'Ticket' AND `Ticket`.`parent` IN (11,176,49632,49920,49921,50126,49628,49672,49673,49674,49676,49677,49678,49679,49680,49712,49848,49908,50038,50065,50192,49681,49682,49683,49684,49685,49686,49689,49690,49691,49693,49694,49695,49696,49697,49698,49699,49700,49701,49702,49704,49705,49706,49707,49709,49710,49711,49722,49723,49727,49728,49731,49733,49737,49738,49740,49741,49744,49745,49746,49749,49750,49751,49752,49753,49754,49756,49757,49778,49780,49790,49796,49801,49802,49803,49804,49805,49808,49843,49849,49851,49854,49855,49856,49860,49861,49864,49875,49876,49878,49844,49850,49845,49846,49847,49909,49910,49912,49919,49927,49931,49937,49948,49964,49993,50006,50008,49907,50039,50040,50043,50060,50025,50066,50073,50074,50086,50100,50101,50102,50123,50125,50142,50193,50197,50211,50214,50128,50129) AND `Ticket`.`published` = 1 AND `Ticket`.`deleted` = 0 ) GROUP BY Ticket.id ORDER BY views DESC LIMIT 9 "
0.3498919: SQL executed
0.0001910: Total rows: 113
0.0002520: Rows fetched
0.0007212: Returning raw data
0.0163229: Created inline chunk with name "2332b555c97df802cbd2faaacae37ddc"
0.0950820: Returning processed chunks
0.4688890: Total time
23 855 104: Memory usage
Вызываю так:[[!getTickets?
&tpl=`@INLINE <p><a href="[[+uri]]">[[+pagetitle]] ([[+views]])</a></p>`
&parents=`11`
&leftJoin=`{
"View": {
"class":"TicketView",
"alias":"View",
"on": "Ticket.id = View.parent"
}
}`
&select=`{
"Ticket":"*",
"View": "COUNT(View.parent) as views"
}`
&sortby=`views`
&groupby=`Ticket.id`
&showLog=`1`
&sortdir=`DESC`
&limit=`9`
]]
Интересно, почему твой код у меня выводит только [[+views]], а остальные плейсхолдеры не видит, как будто не выбрал их. То есть никакие [[+uri]] и [[+pagetitle]] не выводятся!
Да, вот и &showLog:
0.0000939: Query parameters are prepared.
0.0000210: xPDO query object created
0.0001080: leftJoined TicketsSection as Section
0.0000830: leftJoined modUser as User
0.0000799: leftJoined modUserProfile as Profile
0.0000808: leftJoined TicketVote as Vote
0.0000880: leftJoined TicketStar as Star
0.0000849: leftJoined TicketView as View
0.0000010: Grouped by Ticket.id
0.0000370: Added selection of TicketsSection: SQL_CALC_FOUND_ROWS `id` AS `section.id`, `type` AS `section.type`, `contentType` AS `section.contentType`, `pagetitle` AS `section.pagetitle`, `longtitle` AS `section.longtitle`, `description` AS `section.description`, `alias` AS `section.alias`, `link_attributes` AS `section.link_attributes`, `published` AS `section.published`, `pub_date` AS `section.pub_date`, `unpub_date` AS `section.unpub_date`, `parent` AS `section.parent`, `isfolder` AS `section.isfolder`, `introtext` AS `section.introtext`, `richtext` AS `section.richtext`, `template` AS `section.template`, `menuindex` AS `section.menuindex`, `searchable` AS `section.searchable`, `cacheable` AS `section.cacheable`, `createdby` AS `section.createdby`, `createdon` AS `section.createdon`, `editedby` AS `section.editedby`, `editedon` AS `section.editedon`, `deleted` AS `section.deleted`, `deletedon` AS `section.deletedon`, `deletedby` AS `section.deletedby`, `publishedon` AS `section.publishedon`, `publishedby` AS `section.publishedby`, `menutitle` AS `section.menutitle`, `donthit` AS `section.donthit`, `privateweb` AS `section.privateweb`, `privatemgr` AS `section.privatemgr`, `content_dispo` AS `section.content_dispo`, `hidemenu` AS `section.hidemenu`, `class_key` AS `section.class_key`, `context_key` AS `section.context_key`, `content_type` AS `section.content_type`, `uri` AS `section.uri`, `uri_override` AS `section.uri_override`, `hide_children_in_tree` AS `section.hide_children_in_tree`, `show_in_tree` AS `section.show_in_tree`, `properties` AS `section.properties`
0.0000091: Added selection of modUser: `username`
0.0000181: Added selection of modUserProfile: `internalKey`, `fullname`, `email`, `phone`, `mobilephone`, `blocked`, `blockeduntil`, `blockedafter`, `logincount`, `lastlogin`, `thislogin`, `failedlogincount`, `sessionid`, `dob`, `gender`, `address`, `country`, `city`, `state`, `zip`, `fax`, `photo`, `comment`, `website`, `extended`
0.0000911: Added selection of Ticket: `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.0000110: Added selection of TicketVote: `value` as `vote`
0.0000298: Added selection of TicketStar: COUNT(`id`) as `star`
0.0000229: Added selection of TicketView: COUNT(View.parent) as views
0.0005679: Processed additional conditions
0.0007329: Added where condition: class_key=Ticket, Ticket.parent:IN(34,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191), Ticket.published=1, Ticket.deleted=0
0.0000250: Sorted by views, DESC
0.0000019: Limited to 8, offset 0
0.0002480: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `Section`.`id` AS `section.id`, `Section`.`type` AS `section.type`, `Section`.`contentType` AS `section.contentType`, `Section`.`pagetitle` AS `section.pagetitle`, `Section`.`longtitle` AS `section.longtitle`, `Section`.`description` AS `section.description`, `Section`.`alias` AS `section.alias`, `Section`.`link_attributes` AS `section.link_attributes`, `Section`.`published` AS `section.published`, `Section`.`pub_date` AS `section.pub_date`, `Section`.`unpub_date` AS `section.unpub_date`, `Section`.`parent` AS `section.parent`, `Section`.`isfolder` AS `section.isfolder`, `Section`.`introtext` AS `section.introtext`, `Section`.`richtext` AS `section.richtext`, `Section`.`template` AS `section.template`, `Section`.`menuindex` AS `section.menuindex`, `Section`.`searchable` AS `section.searchable`, `Section`.`cacheable` AS `section.cacheable`, `Section`.`createdby` AS `section.createdby`, `Section`.`createdon` AS `section.createdon`, `Section`.`editedby` AS `section.editedby`, `Section`.`editedon` AS `section.editedon`, `Section`.`deleted` AS `section.deleted`, `Section`.`deletedon` AS `section.deletedon`, `Section`.`deletedby` AS `section.deletedby`, `Section`.`publishedon` AS `section.publishedon`, `Section`.`publishedby` AS `section.publishedby`, `Section`.`menutitle` AS `section.menutitle`, `Section`.`donthit` AS `section.donthit`, `Section`.`privateweb` AS `section.privateweb`, `Section`.`privatemgr` AS `section.privatemgr`, `Section`.`content_dispo` AS `section.content_dispo`, `Section`.`hidemenu` AS `section.hidemenu`, `Section`.`class_key` AS `section.class_key`, `Section`.`context_key` AS `section.context_key`, `Section`.`content_type` AS `section.content_type`, `Section`.`uri` AS `section.uri`, `Section`.`uri_override` AS `section.uri_override`, `Section`.`hide_children_in_tree` AS `section.hide_children_in_tree`, `Section`.`show_in_tree` AS `section.show_in_tree`, `Section`.`properties` AS `section.properties`, `User`.`username`, `Profile`.`internalKey`, `Profile`.`fullname`, `Profile`.`email`, `Profile`.`phone`, `Profile`.`mobilephone`, `Profile`.`blocked`, `Profile`.`blockeduntil`, `Profile`.`blockedafter`, `Profile`.`logincount`, `Profile`.`lastlogin`, `Profile`.`thislogin`, `Profile`.`failedlogincount`, `Profile`.`sessionid`, `Profile`.`dob`, `Profile`.`gender`, `Profile`.`address`, `Profile`.`country`, `Profile`.`city`, `Profile`.`state`, `Profile`.`zip`, `Profile`.`fax`, `Profile`.`photo`, `Profile`.`comment`, `Profile`.`website`, `Profile`.`extended`, `Ticket`.`id`, `Ticket`.`type`, `Ticket`.`contentType`, `Ticket`.`pagetitle`, `Ticket`.`longtitle`, `Ticket`.`description`, `Ticket`.`alias`, `Ticket`.`link_attributes`, `Ticket`.`published`, `Ticket`.`pub_date`, `Ticket`.`unpub_date`, `Ticket`.`parent`, `Ticket`.`isfolder`, `Ticket`.`introtext`, `Ticket`.`content`, `Ticket`.`richtext`, `Ticket`.`template`, `Ticket`.`menuindex`, `Ticket`.`searchable`, `Ticket`.`cacheable`, `Ticket`.`createdby`, `Ticket`.`createdon`, `Ticket`.`editedby`, `Ticket`.`editedon`, `Ticket`.`deleted`, `Ticket`.`deletedon`, `Ticket`.`deletedby`, `Ticket`.`publishedon`, `Ticket`.`publishedby`, `Ticket`.`menutitle`, `Ticket`.`donthit`, `Ticket`.`privateweb`, `Ticket`.`privatemgr`, `Ticket`.`content_dispo`, `Ticket`.`hidemenu`, `Ticket`.`class_key`, `Ticket`.`context_key`, `Ticket`.`content_type`, `Ticket`.`uri`, `Ticket`.`uri_override`, `Ticket`.`hide_children_in_tree`, `Ticket`.`show_in_tree`, `Ticket`.`properties`, `Vote`.`value` as `vote`, COUNT(`Star`.`id`) as `star`, COUNT(View.parent) as views FROM `modx_site_content` AS `Ticket` LEFT JOIN `modx_site_content` `Section` ON `Section`.`id` = `Ticket`.`parent` LEFT JOIN `modx_users` `User` ON `User`.`id` = `Ticket`.`createdby` LEFT JOIN `modx_user_attributes` `Profile` ON `Profile`.`internalKey` = `User`.`id` LEFT JOIN `modx_tickets_votes` `Vote` ON `Vote`.`id` = `Ticket`.`id` AND `Vote`.`class` = "Ticket" AND `Vote`.`createdby` = 2 LEFT JOIN `modx_tickets_stars` `Star` ON `Star`.`id` = `Ticket`.`id` AND `Star`.`class` = "Ticket" AND `Star`.`createdby` = 2 LEFT JOIN `modx_tickets_views` `View` ON Ticket.id = View.parent WHERE ( `Ticket`.`class_key` = 'Ticket' AND `Ticket`.`parent` IN (34,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191) AND `Ticket`.`published` = 1 AND `Ticket`.`deleted` = 0 ) GROUP BY Ticket.id ORDER BY views DESC LIMIT 8 "
0.0001249: SQL executed
0.0000591: Total rows: 107
0.0001259: Rows fetched
0.0003910: Returning raw data
0.0016451: Created inline chunk with name "8bf4cd4b7262b14ab2057e2f04ce31f4"
0.0130310: Returning processed chunks
0.0175960: Total time
12 320 768: Memory usage
Прошу прощения. Сам написал о проблеме и сам её решил… ))
Дело было в INLINE-чанке, нужно было вывести в отдельный чанк. Я же просто заменил на фигурные скобки и получилось так: {{+uri}}, {{+pagetitle}}
Дело было в INLINE-чанке, нужно было вывести в отдельный чанк. Я же просто заменил на фигурные скобки и получилось так: {{+uri}}, {{+pagetitle}}
Не помню где нашел такой вариант, но помогло вот так:
[[!pdoResources?
&loadModels=`tickets`
&class=`Ticket`
&leftJoin=`{
"TicketView": {
"class": "TicketView",
"on": "Ticket.id = TicketView.parent"
}
}`
&parents=`0`
&select=`{
"Ticket": "Ticket.*",
"TicketView": "COUNT(TicketView.uid) as countviews"
}`
&groupby=`Ticket.id`
&sortby=`{"countviews":"desc"}`
&tpl=`news.tpl`
]]
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.