Company | Newzulu Platform | Developer

Developer Template Documentation v4.12.2.47

fm:Friends


The fm:Friends component will allow you to display a list of friends based on a userid.

Example

<fm:Friends uid="{$loggedinuser.id}"> <ul> <fm:Loop> <li>{$$friend.firstname} {$$friend.lastname}</li> </fm:Loop> </ul> </fm:Friends>

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
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
statusOptionalconfirmedThis allows you to filter the list of friends by different statuses. This list is a comma-separated list of string, example: confirmed,waiting,notconfirmed. "notfriends" is not supported here for obvious reasons.
uidOptionalCurrently logged in userThe user id of the friendlist you're requesting

Template variables

NameDescription
loop.hasResultsThe contents of this variable will be either 0 or 1, depending on if there are items in the list.
loop.oddClassThe contents of this variable will reflect the "oddClass" attribute. This will only be set for odd rownumbers.
loop.evenClassThe contents of this variable will reflect the "evenClass" attribute. This will only be set for even rownumbers.
loop.indexThe 0-based index of the item in the loop. (Will contain 0,1,2,3,4, etc.)
loop.countThe count of the current item in the loop. (Will contain 1,2,3,4,5 etc.)
loop.currentPageIf a pager is involved in this loop, this will contain the current page number (0-based index). If page information is not available, this will be 0.
loop.currentPage1This value is currentPage + 1. This number can be useful to display the current page number to use user. (people generally count from 1, not 0).
loop.totalPagesTotal number of pages avaiable in this loop. This will be 0 if the loop does not support paging.
loop.totalItemsTotal number of individual items. This will be 0 if the loop does not support paging.
loop.pageSizeTotal number of items on 1 single page. This will be 0 if the loop does not support paging.
friend.userThe friend's username
friend.nicknameFriend's nickname
friend.firstnameFriend's firstname
friend.lastnameFriend's lastname
friend.emailFriend's email
friend.idFriend's user id

See also

<< 3.2.17 fm:FileInfo 3.2.19 fm:FriendStatus >>