Kentico CMS 7.0 Community Site Guide

Creating the Access page

Creating the Access page

Previous topic Next topic Mail us feedback on this topic!  

Creating the Access page

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

Many of the pages in the Groups section contain the Group security access web part. This web part checks if the user is permitted to see the content of the page. When a user tries to access such a page with insufficient permissions, they are redirected to the Access page. Here, a message is displayed telling that access is not permitted. This message is displayed by the Group security message web part.

 

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

 

commguide_clip0256

 

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

 

commguide_clip0257

 

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: My Community Site - Access

Template code name: MyCommunitySite.Access

Template category: My Community Site templates

Template description: some text describing the page template

 

Click OK. Click Save.

 

commguide_clip0258

 

4. Switch to the Properties -> URLs tab. Enter /Groups/{GroupName}/Access into the Document URL path field and click Save.

 

commguide_clip0259

 

5. Switch to the Design tab. First, remove the Editable text web part from zoneCenter. We will add the Static text web part instead of it. The Static text web part will be set up so that it displays the path to the page in a form of breadcrumbs. Click the Add web part (AddWebPart) icon of the zoneCenter web part zone and choose the Text & Images -> 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: Breadcrumbs

Text:

 

<div class="GroupBreadcrumbs">

<a href="~/Groups.aspx" class="CMSBreadCrumbsLink">Groups</a> <span class="TitleBreadCrumbSeparator">&nbsp;</span> <a href="~/Groups/{%CommunityContext.CurrentGroup.GroupName%}.aspx" class="CMSBreadCrumbsLink">{%CommunityContext.CurrentGroup.GroupDisplayName|(encode)true%}</a> <span class="TitleBreadCrumbSeparator">&nbsp;</span> <span class="CMSBreadCrumbsCurrentItem"> Access denied </span>

</div>

 

Click OK.

 

6. The main part of this page is the Group security message web part. The web part will display the warning message about insufficient permissions. Click the Add web part (AddWebPart) icon of the zoneCenter web part zone and choose the Text & Images -> Static text web part. You do not need to set any properties of the web part, leave all of them at the default values.

 

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

 

commguide_clip0260