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

TicketLatest

Feed of latest tickets or comments with optional cache.

Call uncached.

Parameters

NameDefaultDescription
&actioncommentsMode: comments or tickets (case insensitive)
&cacheKeyCache key; empty disables caching
&cacheTime1800Cache lifetime in seconds
&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.comment.latestRow chunk
&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

Latest tickets

fenom
{'!TicketLatest' | snippet : [
  'limit' => 5,
  'fastMode' => 1,
  'action' => 'tickets',
  'tpl' => 'tpl.Tickets.ticket.latest',
]}
modx
[[!TicketLatest?
  &limit=`5`
  &fastMode=`1`
  &action=`tickets`
  &tpl=`tpl.Tickets.ticket.latest`
]]

Latest comments

fenom
{'!TicketLatest' | snippet : [
  'limit' => 5,
  'fastMode' => 1,
  'action' => 'comments',
  'tpl' => 'tpl.Tickets.comment.latest',
]}
modx
[[!TicketLatest?
  &limit=`5`
  &fastMode=`1`
  &action=`comments`
  &tpl=`tpl.Tickets.comment.latest`
]]