PeopleGroups
Last updated Apr 8th, 2021 | Page history | Improve this page | Report an issue
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
Budget
$311 per month—let's make that $500!
Learn moreThe PeopleGroups Snippet¶
This snippet displays all the User Groups of a site.
Usage¶
Display the first 10 User Groups, sorted by name:
[[!PeopleGroups]]
Available Properties¶
Name | Description | Default |
---|---|---|
tpl | The Chunk to use for each User Group. | pplUserGroup |
user | Optional. If an ID of a User is specified, will only show User Groups for that User. | |
limit | The number of user groups 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.) | name |
sortByAlias | The class to use with the sort field. | modUserGroup |
sortDir | The direction to sort by. | ASC |
cls | Will append this CSS class to each item. | ppl-usergroup |
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. | peoplegroups. |
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 |
PeopleGroups Chunks¶
The only chunk used in the PeopleGroups snippet is the &tpl property, which uses the default of pplUserGroup.
Examples¶
Show all the User Groups for a site.
[[PeopleGroups? &limit=`0`]]
Show all the User Groups for the User with ID 23:
[[PeopleGroups? &user=`23` &limit=`0`]]
Show the first 10 User Groups for the User with ID 15:
[[!PeopleGroups? &user=`15`]]
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
Budget
$311 per month—let's make that $500!
Learn more