CommunityGroupList
The CommunityGroupList server control, part of Ektron's Community Platform, displays a list of community groups. It can be configured to sort groups by name, newest, or most popular.
When associated with a user, this control can show
- community groups with which a user is associated
- community groups the user has been invited to join
- community groups for which the user's request to join is pending
CommunityGroupList server control displays the following information about each community group.
- Community Group Avatar. An image representing the group.
- Community Group Name. The name of a community group.
- Type. Whether the community group is Public or Restricted.
- Short Description. The community group’s description, as entered in the Short Description field of the group’s properties.
- Tags. Tags associated with the community group.
- Founded. When the community group was created.
- Members. The number of users in the community group.
Inserting the CommunityGroupList server control onto a page
Prerequisite
You must have installed the server controls. See Installing server controls into Visual Studio Toolbox.
- In Visual Studio, choose View > Toolbox.
- Click the Ektron server control tab to display the server controls.
- Drag the CommunityGroupList server control and drop it into the desired location on the page.
NOTE: You also can place the cursor on the page where you want the server control, then double click the server control that you want.
<CMS:CommunityGroupList ID="CommunityGroupList1" runat="server" />
- Click on
CommunityGroupList
in the code to display and modify the control’s properties using the Properties window of Visual Studio. The page is updated as you modify the property values.
CommunityGroupList properties
The following are Ektron-specific server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified. properties. For information about native .NET properties such as font, height, width and border style, use Visual Studio® help.
- AllowGroupCreation (Boolean)
If the user has permission to create community groups and this property is set to True, the Create Groups link appears in the control.
- True. Create Group link appears on the control.
- False. Create Group link is hidden on the control.
- AvatarHeight (Integer)
The display height (in pixels) of the avatar in the results box.
- AvatarWidth (Integer)
The display width (in pixels) of the avatar in the results box.
- CacheInterval (Double)
The number of seconds that a server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified.’s data is cached. The default is 0 (zero). For example, if you want to cache the data for 5 minutes, set to 300. See also: Caching with server controls.
- DefaultUserID (Long)
The default User ID for this control to use if no matching dynamic parameter value is passed.
- DisplayMode (eDisplayMode)
Select the way this control initially displays community group information. Choices are:
- Newest. Newly added community groups.
- MostPopular. Community groups with the most members.
- Name. Community groups sorted alphabetically by name
- MyGroups. Community groups to which the logged-in user belongs
- MyPendingGroups. Community groups to which the logged-in user has asked to join, but has not yet been accepted
- DisplayXslt (String)
If desired, enter a relative or absolute path to an Xslt that determines the display of the page.
WARNING!
If you enter a valid EkML file at the MarkupLanguage property, the Displayxslt property value is ignored.WARNING! Files stored in the
siteroot\Workarea
folder are overwritten (or deleted) when you upgrade Ektron. To avoid problems, copy the default file to a folder outside thesiteroot\workarea
folder then edit it. If there is no default file, create the file outside thesiteroot\workarea
folder. Next, in this property, enter the path to that file relative to the site root folder. - DoInitFill (Boolean)
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
- DynamicUserParameter (String)
Gets or sets the QueryString parameter to read a user ID dynamically. To use the default user ID, leave blank.
- Hide (Boolean)
Hides or displays the output of the control in design time and run time.
- True. Hide the control output.
- False. Display the control output.
- Language (Integer)
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
- Link (String)
Add a link to the group’s profile page. This allows a user to click a link in the community group list and be taken to the group’s profile page. The link includes these 2 variables.
- {0}. Group ID
- {1}. Group name
The link requires both variables. The Web form can be relative or absolute. Below is an example.
groupprofilepage.aspx?gid={0}&gn={1}
- LinkTarget (ItemLinkTargets)
Determines the type of window that appears when you click a link in the server control.
- _Self (default). Opens in same window.
- _Top. Opens in parent window.
- _Blank. Opens in new window.
- _Parent. Opens in the parent frame.
- MarkupLanguage (String)
Enter the template markup file (
.ekml
) that controls the display of this server control. To use the default .ekml file, leave this field blank.The default file follows this pattern:
\siteroot\Workarea\template\this object\objectname.ekml
. For example,\siteroot\Workarea\template\collection\collection.ekml.
To customize the default .ekml file, copy it to a folder outside the
siteroot\workarea
folder and edit it. Next, in this property, enter the path to that file relative to the site root folder.See also: Ektron Markup Language
- MaxResults (Integer)
The Maximum number of items to fetch. 0 (zero) = unlimited.
- ShowMySortingOptions (Boolean)
If this control is associated with a user and this property is set to True, the controls displays the following sorting options:
- My Groups. A list of community groups to which the user belongs.
- Group Requests. A list of community groups to which a user has requested to join, but has yet to be accepted.
- Group Invitations. A list of community group that the user has been invited to join, but has yet to accept.
When set to False, Leave Selected Group is the only option that appears.
Depending on how the
DisplayMode
property is set, you may see additional sorting options. - ShowSortingOptions (Boolean)
If this control is used to display a general list of community groups and this property is set to
True
, the following sorting options appear.- Newest. Recently added community groups
- Most Popular. Community groups with the most members.
- Group Name. Community groups sorted alphabetically
- Stylesheet (String)
Specify the path to a style sheet for use with this server control. Leave blank to use the default style sheet. To use a custom style sheet, place it in a folder outside the
siteroot\workarea
folder then edit it. Next, in this property, enter the path to the custom style sheet relative to the site root folder.NOTE: If you enter a valid EkML file at the
MarkupLanguage
property, theStylesheet
property is ignored. - SuppressWrapperTags (Boolean)
Suppresses the output of the span/div tags around the control.
- True. Suppress wrap tags.
- False (default). Allow wrap tags.
- TagTemplate (String)
Add a path to another Web form to create links for the tag text. The path can be relative or absolute. By providing the path to CommunitySearch server control, a user viewing the list of groups can click a tag and search for other groups with the same tag. There are 5 parameters that are automatically added to the link’s QueryString that let you pass information about tag.
- searchgrptag. The tag’s text for community groups.
- TagId. The tag’s ID.
- TagLanguage. The tag’s language.
- TagCount. The tag’s count. The tag’s count is the amount of times a tag has been used.
- TagType. The tag’s type. The tag’s type will be user or community group.
In addition to these parameters, you can add your own by defining them in the path. When you do, these parameters will be appended to your parameters.
- TagTemplateTarget (ItemLinkTargets)
Determines the type of window that appears when you click a link in the server control.
- _Self (default). Opens in same window.
- _Top. Opens in parent window.
- _Blank. Opens in new window.
- _Parent. Opens in the parent frame.
- WrapTag (String)
Lets a developer specify a server control’s tag.
- Span (default). Designate an inline portion of an HTML document as a span element.
- Div. Apply attributes to a block of code.
- Custom. Lets you use a custom tag.