The fm:GroupInfo can be used to retrieve information about a user-defined group.
This example shows the group name, its id, description and the date it was created.
<fm:GroupInfo groupId="12345">
<p>Group Name: {$$group.name}</p>
<p>Group id: {$$group.id}</p>
<p>Group description: {$$group.description}</p>
<p>Date created: {$$group.created}</p>
</fm:GroupInfo>
Name | Required | Default | Description |
---|---|---|---|
groupId | Required | N/A | The group id to fetch information for. |
includeChildGroupCount | Optional | N/A | Option to return the number of child groups belonging to this group) |
includeChildMediaTotal | Optional | N/A | Option to return total media count (including the group's children) |
Name | Description |
---|---|
group.id | Group id |
group.name | Group name |
group.description | Description |
group.parentGroup | The ID of the parent group. |
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.publicUrl | The public URL of the logo. |
group.thumbUrl | The thumb URL of the logo. |
group.created | The creation date in YYYY-MM-DD HH:MM:SS format |
group.createdBy | This is a user-id |
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.totalMediaCount | This variable contains the total number of items associated with the group and its children. Only returned if includeChildMediaTotal is set. |
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.startDate | The startdate of the group in YYYY-MM-DD HH:MM:SS format |
group.endDate | The enddate of the group in YYYY-MM-DD HH:MM:SS format |
group.moderationStatus | The moderationstatus code for this group. This is a string containing either 'accepted', 'denied', or 'unmoderated' |
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.otherJS | Javascript object containing data from the "other" field. |
group.custom1 | A string of custom text, maximum 32 characters long |
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 shows the group name, its id and its metadata as a serialized string (group.meta) and 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.
To get the keys of the group's metadata, parse through the $group.metakeys array. Its elements are available integers of the array, the first one being {$$group.metakeys.0} =========
<fm:GroupInfo groupId="12345">
Group Name: {$$group.name} </p>
Group id: {$$group.id} </p>
group.meta: {$$group.meta} </p>
group.metadata.field1meta: {$$group.metadata.<key 1>} </p>
<p>
group.Nmetadata: {$$group.Nmetadata} - </BR>
group.metakeys.0: {$$group.metakeys.0} </BR>
group.metakeys.1: {$$group.metakeys.1} </BR>
group.metadata.[group.metakeys.0]: {$$group.metadata.[group.metakeys.0]} </BR>
group.metadata.[group.metakeys.1]: {$$group.metadata.[group.metakeys.1]} </BR>
</p>
</fm:GroupInfo>