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

TicketLatest

Outputs the feed of latest created and/or commented tickets.

The snippet is called uncached.

Parameters

NameDefaultDescription
&actionCommentsSnippet mode. Available: Comments or Tickets.
&cacheKeySnippet cache key. If empty, result caching is disabled.
&cacheTime1800Cache lifetime.
&depth10Search depth of child resources from each parent.
&fastMode0If enabled, only raw DB values are inserted into the result chunk; all unprocessed MODX tags (filters, snippet calls, etc.) are stripped.
&includeContent0Include the content field of resources.
&includeTVsComma-separated list of TV names to select. E.g. "action,time" yields placeholders [[+action]] and [[+time]].
&limit10Maximum number of results.
&offset0Number of results to skip from the start.
&outputSeparatorOptional string to separate results.
&parentsComma-separated list of parent IDs to search in. Default: current parent. Use 0 for no limit.
&resourcesComma-separated list of resource IDs to include. If an ID is prefixed with minus, that resource is excluded.
&showDeleted0Include deleted resources.
&showHidden1Include resources hidden from the menu.
&showLog0Show extra debug info. Only for users logged in to the "mgr" context.
&showUnpublished0Include unpublished resources.
&sortbycreatedonSort field.
&sortdirDESCSort direction.
&toPlaceholderIf set, the snippet saves all data to this placeholder instead of outputting to the page.
&tpltpl.Tickets.comment.latestChunk for each result row.
&tvPrefixPrefix for TV placeholders, e.g. "tv.". Default: empty.
&userFilter to items created by this user only.
&whereJSON-encoded string with extra conditions for the query.

Подсказка

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

Examples

  • Output latest tickets

    modx
    [[!TicketLatest?
      &limit=`5`
      &fastMode=`1`
      &action=`tickets`
      &tpl=`tpl.Tickets.ticket.latest`
    ]]
  • Output latest comments

    modx
    [[!TicketLatest?
      &limit=`5`
      &fastMode=`1`
      &action=`comments`
      &tpl=`tpl.Tickets.comment.latest`
    ]]