fm:GroupList allows you to create a list of groups users created on the system.
This example lists the groups for a vhost and shows their name, id and description.
<fm:GroupList>
<fm:Loop>
Group Name: {$$group.name}, Group Id: {$$group.id}, Group Description: {$$group.description} <BR>
</fm:Loop>
<fm:NoResults>
No groups have been created yet.
</fm:NoResults>
</fm:GroupList>
Name | Required | Default | Description |
---|---|---|---|
createdBy | Optional | N/A | Only return groups that where created by the given user ID |
custom1 | Optional | N/A | Only return groups that have the given string as their custom1 value |
endAfter | Optional | none | A date and time that the returned events must end after |
endBefore | Optional | none | A date and time that the returned events must end before |
evenClass | Optional | The 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 | |
groupType | Optional | N/A | Only return groups of provided type. 1 = groups, 2 = events, 3 = assignments. Example: groupType="1,3" will only return groups and assignments in the groupList. |
includeChildren | Optional | None | Specifies the moderation status of the child-groups (shown in the 'Include child-groups' field on the searchcollection page). May only be used in combination with the parentGroup attribute. The possible values are:
|
mediaID | Optional | N/A | Only return groups that contain the given media |
moderationStatus | Optional | N/A | Filter by this moderationstatus. Possible values are "accepted", "denied", "unmoderated", "moderated", "notdenied","all" |
oddClass | Optional | The 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 | |
pageSize | Optional | 100 | Sets the total number of items per page. |
parentGroup | Optional | (empty) | Groups support nesting, you can display all sub-groups for a specific parent-group by specifying the ID using this attribute. Specifying 0 indicates you only want the top-level groups. An empty value is the default and indicates that no filtering based on the parent group will be applied. |
searchDescription | Optional | N/A | Only return groups that have the given string in their description |
searchName | Optional | N/A | Only return groups that have the given string in their name |
searchQuery | Optional | N/A | Searches using the full-text index on title, description, address and city |
sort | Optional | created DESC | Sets the sort field. Use the format fieldname ASC/DESC. NB: To retrieve the groups in the same order they are in the group-event tree sort by "treeleft ASC". Currently, the following sort fields are supported:
|
startAfter | Optional | none | A date and time that the returned events must start after |
startBefore | Optional | none | A date and time that the returned events must start before |
startPage | Optional | 0 | Sets the startpage for this list. |
uid | Optional | N/A | Only return groups that the given user ID is a member of |
Name | Description |
---|---|
loop.hasResults | The contents of this variable will be either 0 or 1, depending on if there are items in the list. |
loop.oddClass | The contents of this variable will reflect the "oddClass" attribute. This will only be set for odd rownumbers. |
loop.evenClass | The contents of this variable will reflect the "evenClass" attribute. This will only be set for even rownumbers. |
loop.index | The 0-based index of the item in the loop. (Will contain 0,1,2,3,4, etc.) |
loop.count | The count of the current item in the loop. (Will contain 1,2,3,4,5 etc.) |
loop.currentPage | If 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.currentPage1 | This 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.totalPages | Total number of pages avaiable in this loop. This will be 0 if the loop does not support paging. |
loop.totalItems | Total number of individual items. This will be 0 if the loop does not support paging. |
loop.pageSize | Total number of items on 1 single page. This will be 0 if the loop does not support paging. |
group.id | Group id |
group.name | Group name |
group.description | Description |
group.note | The note field can be used to specify additional information about the group, generally this is only used within the mediafactory |
group.logo | The logo is actually a media-id, use this in conjunction with the mediaviewers. |
group.thumbUrl | The thumb URL of the logo. |
group.publicUrl | The publiuc URL of the logo. |
group.created | The creation date in YYYY-MM-DD HH:MM:SS format |
group.startDate | The start date of the event |
group.endDate | The end date of the event |
group.createdBy | This is a user-id |
group.parentGroup | This is the id of the group's parent |
group.memberCount | This variable contains the total number of group members |
group.mediaCount | This variable contains the total number of items associated with the group |
group.approvedMediaCount | This variable contains the number of media items associated with the group that have been approved |
group.notDeniedMediaCount | This variable contains the number of media items associated with the group that have not been denied |
group.notDeniedCommentCount | This variable contains the total number of comments of media items that are either unmoderated or approved files that have not been trashed or deleted. |
group.approvedCommentCount | This variable contains the total number of approved comments of successfully convereted media items. It does not contain any media items that have been trashed or deleted. |
group.commentCount | This variable contains the total number of comments either unmoderatod, approved or denied for a media item. |
group.geo_longitude | The longitude of the group. |
group.geo_latitude | The latitude of the group. |
group.moderationStatus | The current moderation-status for the group. This can be either unmoderated, accepted or denied |
group.address | Address of the group. |
group.city | City the group is in. |
group.state | 2-letter state or province |
group.postalcode | Postal/zip-code |
group.country | 2-letter country code |
group.publisherid | Brightcove publisher id |
group.custom1 | A string of custom text, maximum 32 characters long |
group.other | The group's meta-data as an array. Its keys and values are configurable in the community group info page. Because the group's metadata is configurable, its keys differ for each group. Sample group.other variables for the templates are:
|
group.meta | The group's meta-data as a serialized string |
group.metadata | The group's meta-data as an array. Its keys and values are configurable in the community group info page. Because the group's metadata is configurable, its keys differ for each group. Sample group.metadata variables for the templates are:
|
group.metakeys | The group's meta-data keys as an array. Since a group's metadata is configurable, its keys differ for each group. The group.metakeys allow you to access the group's metadata by parsing through its keys. Sample group.metakeys are:
The list continues until the last element of the array, which has the key value of: group.Nmetadata - 1 |
group.Nmetadata | The number of meta-data key/value pairs for the group. The first pair has the key value of 0, and the last has the key value of: group.Nmetadata - 1 |
group.childCount | The number of direct child groups for this group, NOT including child groups of child groups, etc. |
group.groupType | The group type, which can be one of the following: 1 (Group), 2 (Event) or 3 (Assignment). |
This example lists the approved child groups for parent group 9501, and shows their following fields: id, membercount and approvedCommentCount.
<fm:GroupList parentGroup=9501" includeChildren=approved" fields="moderationStatus, membercount, approvedCommentCount" sort="membercount DESC" pageSize="30" >
<fm:Loop>
Id: {$$group.id} - group.memberCount: {$$group.memberCount} - group.approvedCommentCount {$$group.approvedCommentCount} <BR>
</fm:Loop>
<fm:NoResults> No groups have been created yet. </fm:NoResults>
</fm:GroupList>
This example lists the groups for a vhost and shows their name and metadata as elements of an array (group.metadata.<key>).
Because a group's metadata is configurable, its keys differ for each group, and you must enter the correct metadata key, otherwise the template will break.
<fm:GroupList>
<fm:Loop>
Group Name: {$$group.name}, Group Id: {$$group.id}, Group Metadata: {$$group.metadata.<key>} <BR>
</fm:Loop>
<fm:NoResults>
No groups have been created yet.
</fm:NoResults>
</fm:GroupList>