Jump to main content Jump to doc navigation

The Peoples Snippet

This snippet displays all the Users of a site.

Usage

[[Peoples]]

Available Properties

Name Description Default
1 tpl The Chunk to use for each User.
2 active 0 to show only inactive Users, 1 to show only active Users, 2 to show all Users.
3 usergroups Optional. A comma-separated list of User Group names to filter by.
4 limit The number of users to limit per call. Defaults to 10. Set to 0 to show all.
5 start The start index to begin with when limiting.
6 sortBy The field name to sort by. (Cannot be an extended field.)
7 sortByAlias The class to use with the sort field.
8 sortDir The direction to sort by.
9 cls Will append this CSS class to each item.
10 altCls Optional. If set, will append this CSS class to every even item.
11 firstCls Optional. If set, will append this CSS class to the first item.
12 lastCls Optional. If set, will append this CSS class to the last item.
13 placeholderPrefix The prefix to use when setting global placeholders, such as total.
14 outputSeparator The separator between each user record.
15 toPlaceholder Optional. If set, will set the output to this placeholder and return empty.
16 userClass The class name of the Users object.
17 userAlias The class alias of the Users object.

Peoples Chunks

The only chunk used in the Peoples snippet is the &tpl property, which uses the default of pplUser.

Examples

Show all the Users for a site.

[[Peoples]]

Available Properties

Name Description Default
tpl The Chunk to use for each User. pplUser
active 0 to show only inactive Users, 1 to show only active Users, 2 to show all Users. 1
usergroups Optional. A comma-separated list of User Group names to filter by.
limit The number of users to limit per call. Defaults to 10. Set to 0 to show all. 10
start The start index to begin with when limiting. 0
sortBy The field name to sort by. (Cannot be an extended field.) username
sortByAlias The class to use with the sort field. User
sortDir The direction to sort by. ASC
cls Will append this CSS class to each item. ppl-user
altCls Optional. If set, will append this CSS class to every even item.
firstCls Optional. If set, will append this CSS class to the first item.
lastCls Optional. If set, will append this CSS class to the last item.
placeholderPrefix The prefix to use when setting global placeholders, such as total. peoples.
outputSeparator The separator between each user record.
toPlaceholder Optional. If set, will set the output to this placeholder and return empty.
userClass The class name of the Users object. modUser
userAlias The class alias of the Users object. User

Peoples Chunks

The only chunk used in the Peoples snippet is the &tpl property, which uses the default of pplUser.

Examples

Show all the Users for a site.

[[Peoples? &limit=`0`]]

Show the first 10 users in the User Group "HR Department":

[[Peoples? &limit=`10` &usergroups=`HR Department`]]

Show all the inactive users in the site:

[[Peoples? &limit=`0` &active=`0`]]

See Also

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Digital Penguin
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • Following Sea
  • Anton Tarasov
  • eydolan
  • Raffy
  • Lefthandmedia
  • Murray Wood
  • Snow Creative
  • Nick Clark
  • Helen
  • JT Skaggs
  • krisznet
  • YJ
  • Yanni
  • Richard

Budget

$366 per month—let's make that $500!

Learn more