Skip to content
  1. Extras
  2. Tickets
  3. Snippets
  4. getTickets

getTickets

Outputs a list of tickets.

Call uncached. Comment count in the chunk may link to #first_unread.

Parameters

NameDefaultDescription
&depth10Search depth from each parent
&fastMode0DB values only; strips unprocessed MODX tags
&includeContent0Include resource content
&includeTVsComma-separated TV names
&limit10Result limit
&offset0Skip results from the start
&outputSeparatorSeparator between rows
&parentsParent IDs; 0 removes parent limit
&resourcesResource IDs; prefix - to exclude
&showDeleted0Include deleted resources
&showHidden1Include resources hidden in menu
&showLog0Debug log for mgr session
&showUnpublished0Include unpublished resources
&sortbycreatedonSort field
&sortdirDESCSort direction
&toPlaceholderStore output in a placeholder
&tpltpl.Tickets.list.rowRow chunk
&tplWrapperWrapper chunk with output placeholder
&tvPrefixTV placeholder prefix
&userFilter by author user ID
&whereExtra JSON conditions

Подсказка

The list can be extended with the common parameters of pdoTools, since Tickets is built on that library.

Examples

List with pagination

fenom
{'!pdoPage' | snippet : ['element' => 'getTickets']}
{$_modx->getPlaceholder('page.nav')}
modx
[[!pdoPage?
  &element=`getTickets`
]]

[[!+page.nav]]

Tickets in a section

fenom
{'!getTickets' | snippet : [
  'parents' => $_modx->resource.id,
  'limit' => 10,
  'sortby' => 'createdon',
  'sortdir' => 'DESC',
]}
modx
[[!getTickets?
  &parents=`[[*id]]`
  &limit=`10`
  &sortby=`createdon`
  &sortdir=`DESC`
]]