fm:GroupInfo


The fm:GroupInfo can be used to retrieve information about a user-defined group.

Example 1

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>

Supported attributes

NameRequiredDefaultDescription
groupIdRequiredN/AThe group id to fetch information for.
includeChildGroupCountOptionalN/AOption to return the number of child groups belonging to this group)
includeChildMediaTotalOptionalN/AOption to return total media count (including the group's children)

Template variables

NameDescription
group.idGroup id
group.nameGroup name
group.descriptionDescription
group.parentGroupThe ID of the parent group.
group.noteThe note field can be used to specify additional information about the group, generally this is only used within the mediafactory
group.logoThe logo is actually a media-id, use this in conjunction with the mediaviewers.
group.publicUrlThe public URL of the logo.
group.thumbUrlThe thumb URL of the logo.
group.createdThe creation date in YYYY-MM-DD HH:MM:SS format
group.createdByThis is a user-id
group.memberCountThis variable contains the total number of group members
group.mediaCountThis variable contains the total number of items associated with the group
group.totalMediaCountThis variable contains the total number of items associated with the group and its children. Only returned if includeChildMediaTotal is set.
group.approvedMediaCountThis variable contains the number of media items associated with the group that have been approved
group.notDeniedMediaCountThis variable contains the number of media items associated with the group that have not been denied
group.notDeniedCommentCountThis 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.approvedCommentCountThis 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.commentCountThis variable contains the total number of comments either unmoderatod, approved or denied for a media item.
group.geo_longitudeThe longitude of the group.
group.geo_latitudeThe latitude of the group.
group.startDateThe startdate of the group in YYYY-MM-DD HH:MM:SS format
group.endDateThe enddate of the group in YYYY-MM-DD HH:MM:SS format
group.moderationStatusThe moderationstatus code for this group. This is a string containing either 'accepted', 'denied', or 'unmoderated'
group.addressAddress of the group.
group.cityCity the group is in.
group.state2-letter state or province
group.postalcodePostal/zip-code
group.country2-letter country code
group.otherJSJavascript object containing data from the "other" field.
group.custom1A string of custom text, maximum 32 characters long
group.metaThe group's meta-data as a serialized string
group.metadataThe 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.metadata.lang} - the group's metadata language
  • {$$group.metadata.twitterUserName} - the group's metadata twitter username
  • {$$group.metadata.rules} - the group's rules
group.metakeysThe 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:
  • {$$group.metakeys.0}
  • {$$group.metakeys.1}

The list continues until the last element of the array, which has the key value of: group.Nmetadata - 1
group.NmetadataThe 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.childCountThe number of direct child groups for this group, NOT including child groups of child groups, etc.
group.groupTypeThe group type, which can be one of the following: 1 (Group), 2 (Event) or 3 (Assignment).

See also

More Examples

Example 2: Use of Metadata

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.&lt;key 1&gt;} </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>