developer documentation r17362

fm:UserList

The UserList allows you to show a list of users from your project.

Example

<fm:UserList fields="id,user"> <fm:Loop> <a href="/profile/{$$user.id}">{$$user.user}</a><br /> </fm:Loop> </fm:UserList>

Supported attributes

NameRequiredDefaultDescription
evenClassOptionalThe contents of this attribute will be placed in the 'loop.evenClass' template variable, only for even row-numbers. This allows you to give every even row a specific css class
fieldsOptionalSee belowComma-separated list of fields you'd like to use. See below for a list of supported fields
oddClassOptionalThe contents of this attribute will be placed in the 'loop.oddClass' template variable, only for odd row-numbers. This allows you to give every odd row a specific css class
pageSizeOptional100The number of items per page
sortOptionalcreated DESCSortfield. You can currently sort on id, firstname, lastname, friends, publicfiles and created. By default this component will sort Descending, to sort Ascending use for example 'friends ASC'
startPageOptional0The starting page. This is a 0-based index

The following fields for the 'fields' attribute are supported:

Template variables

This component defines no template variables.

See also

More examples

This lists sorts the Users by the number of friends they have, and displays a gravatar for each user.

<fm:UserList fields="id,email" sort="friends DESC"> <fm:Loop> <a href="/profile/{$$user.id}"><fm:Gravatar email="{$user.email}" default="monsterid" /></a><br /> </fm:Loop> <fm:NoResults> Poor you, no users were found </fm:NoResults> </fm:UserList>
<< 7.3.47 fm:UserAvatar 7.3.49 fm:VideoPlayer >>