Kentico CMS 6.0 Community Site Guide

Creating groups starter template

Creating groups starter template

Previous topic Next topic Mail us feedback on this topic!  

Creating groups starter template

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

In this example, we will create another starter template. In the Groups section, there will be pages displaying content of particular groups - group's profile, pages (articles), media libraries, group members and group forums. All of the pages will contain the same three web parts, so we will create a starter template with these web parts to facilitate development of these pages.


The page template will be based on the _StarterTemplate page template created in this chapter.


1. Select the Groups page in the content tree and click New. Choose the Page (menu item) document type.




2. Select the My Community Site templates -> _StarterTemplate created in this chapter. Into the Page name field, enter _GroupsTemplate and click Save.




3. Switch to the Properties -> Template tab and click the Save as new template link. Enter the following details in the pop-up dialog:


Template display name: _GroupsTemplate

Template code name: _GroupsTemplate

Template category: My Community Site templates

Template description: some text describing the page template


Click OK. Click Save.




4. Switch to the Design tab. First, we will add the Group links menu into zoneRight web part zone. The menu will contain links interconnecting particular pages of the currently displayed group like its forums, media, etc. The menu will be created using the Static text web part. Click the Add web part (AddWebPart) icon of the zoneRight web part zone and choose the Text -> Static text web part. Set the following properties of the web part, leave the rest of them at the default values.


Web part control ID: Links



<a href="~/Groups/{%CommunityContext.CurrentGroup.GroupName%}.aspx">Home</a><br />

<a href="~/Group-pages/{%CommunityContext.CurrentGroup.GroupName%}/Pages.aspx">Pages</a><br />

<a href="~/Groups/{%CommunityContext.CurrentGroup.GroupName%}/Media-list.aspx">Media</a><br />

<a href="~/Groups/{%CommunityContext.CurrentGroup.GroupName%}/Members.aspx">Members</a><br />

<a href="~/Groups/{%CommunityContext.CurrentGroup.GroupName%}/Forums.aspx">Forums</a><br />


Web part container: Community Site - Blue Box

Web part container title: Group links


Click OK.


5. In zoneCenter, you first need to remove the Editable text web part that is already in the template. Now that zoneCenter is clear, we can add Group security access web part to the top of the web part zone. Click the Add web part (AddWebPart) icon of the zoneCenter web part zone and choose the Community -> Group security access web part. You do not need to set any properties of the web part. Just use the default values and click OK.


6. The page is now finished. In Design tab, it should look as in the following screenshot.




7. Finally, delete the _GroupsTemplate page from the content tree. The page template will remain saved and available.