Allowing users to create groups
You can enable site users to create new groups by placing the Group registration web part on your site. You have to set the following properties of the web part:
- Template source alias path - alias path of the document that will be used, together with the documents stored under it, as a template for groups created by the web part. If left empty, the value of the Settings -> Community -> Group template path field will be used.
- Template target alias path - alias path where the documents copied from the Template source alias path will be loaded when a group is created.
- Automatically create forum - if checked, a forum group and a General discussion forum are automatically added under the created group.
- Automatically create media library - if checked, a media library is automatically added under the created group.
- Automatically create smart search indexes - if checked, a smart search index is automatically created for the documents of the created group, as well as for the new forum if the Automatically create forum property is enabled.
- Group profile URL path - alias path of the page containing the group profile. The {groupname} wildcard can be used to substitute for the name of the current group.
- Combine with default culture - if checked, the default culture will be used when creating group pages under a culture where the source or target nodes were not found.
- Group name label text - text that will be displayed in the form before the field where the group name is entered.
- Text after successful registration - text displayed when a group is successfully created.
- Text after successful registration with approving - text displayed when a group is successfully created, but requires an administrator’s approval to be published on the web.
- Require approval - if checked, the group will have to be approved by a site administrator before it is published on the site.
- Redirect to URL - URL where the user will be redirected after creating the group.
- Hide form after registration - if checked, the form will be hidden after creating the group.
Group pages templates
Each group has its own section on the website where its content is stored - so called group pages. When adding the Group registration web part to your site, you have to specify the Template source alias path and Template target alias path properties. These two properties are essential when creating the group pages section of each group.
The page specified by the Template source alias path and all its sub-pages are copied to the location specified by the Template target alias path.
To get a better idea of how this works, you can take a look at the sample Community Starter site. On the site, the Group registration web part is configured in the following way:
- Template source alias path: /Groups/Template
- Template target alias path: /Group-pages
As you can see in the screenshot below, there is the /Groups/Template page with one sub-page: Pages. When a new group is created, its title page is created under /Group-pages and the Pages page is created under it. The web parts placed on the title page are identical to those placed on the Template page. Web parts on the Pages page are also identical to the source Pages page. Under Pages, all group documents will be stored.
All Kentico documents can be set to be owned by a group. To do this, select a document from the content tree and go to Properties -> General. Then click Change next to Owned by group and choose a group from the drop-down list. This property is used to identify which group a document belongs to and is used by various group context sensitive web parts to display the correct content. It also influences the editing permissions of Group administrator widget zones.
In Settings -> Community, you can enable or disable the Use parent community group for new documents option. It you have it enabled, all newly created documents will inherit the group assignment from their parent document.