icon Extranet Basic
Created by Orckestra

Extranet Developer Guide

Extranet Functions

The Extranet add-on comes with a number of CMS functions.

Some of these functions handle UI-specific tasks on your website, for example, displaying a login form (Composite.Community.Extranet.LoginForm), a signup form (Composite.Community.Extranet.SignupForm) or the login status (Composite.Community.Extranet.LoginStatus) on pages.

Some other functions (for example, Composite.Community.Extranet.User.IsAuthenticated) work more like building blocks you can use in your existing functionality on the website, for example, in Razor or XSLT functions.

You can read about all these functions by generating their documentation in the CMS Console:

  1. In the Functions perspective, expand All Functions | Composite | Community.
  2. Select Extranet.
  3. Click Generate Documentation on the toolbar.
  4. Locate these functions and read their descriptions.

ExtranetSitemapXml

To generate a sitemap on the website, you normally use Composite.Pages.SitemapXml in your XSLT - either directly or indirectly (in other functions that use it).

If your website has extranet-protected pages, it makes sense to generate a sitemap that only shows links to the pages the currently logged-in extranet user has access to.

In this case, you should use the Composite.Community.Navigation.ExtranetSitemapXml function:

  • This function excludes from the resulting sitemap XML all the protected pages the current extranet user has no access to, based on the extranet groups he or she is a member of.
  • It also allows you to arbitrarily include some excluded protected pages by specifying additional group or groups (via the user) assigned to these pages.
  • If you choose to, you can have the function generate additional info for pages - extranet groups they are associated with and whether they are currently active ("is open, "is current").

The function has the following parameters:

  • ProviderName (String): The name of the extranet provider the website is set to. "Extranet" by default, which is the provider the Extranet add-on comes with. If you have more than one extranet provider on your website, you should explicitly select the proper name. The provider name is added to the homepage in the "providerName" attribute.
  • UserId (Guid): The ID of an extranet user the protected pages he/she is assigned to (via extarnet groups) must be additionally included in the resulting sitemap XML. No default value.
  • GroupId (Guid): The ID of an extranet group the protected pages it is assigned to must be additionally included in the resulting sitemap XML. No default value.
  • RemoveBlockedPages (Boolean): If 'True', all the protected pages will be removed from the resulting sitemap XML (except for the pages the current extranet user has access to and/or included via UserId and GroupId). 'True' by default.
  • AddGroups (Boolean): If 'True', the page info will include attributes that will list the groups (as group IDs) assigned to each page ("extranetGroups", "isInherited"). 'False' by default.
  • ActivePageAnnotations (Boolean): If 'True', the page info will include attributes for each active page (e.g. "isopen", "iscurrent") in the sitemap. 'True' by default.

(Some of these parameters have the same purpose as the API function GetExtranetSitemapXml.)

The Composite.Community.Navigation.ExtranetSitemapXml function generates a hierarchy of "Page" elements. Each "Page" element has a few extranet-related attributes (along with the standard Sitemap attributes).

The "isBlocked" attribute set to 'True' or 'False' based on whether the page is protected.

The homepage has the "providerName" attribute set to the name of the extranet provider (default or specific).

If the “AddGroups” parameter is set to 'True', two more attributes added to "Page" elements:

  • The "isInherited" attribute is set to 'True' if the protection is inherited from the parent page.
  • The "extranetGroups" attribute lists comma-separated IDs of extranet groups assigned to this page.
<Page Id="a3055286-0e90-4b04-99dd-fb1a61dde0bf" Title="Frontpage" MenuTitle="Frontpage" UrlTitle="Home" Description="" ChangedDate="2011-07-20T13:47:38.9133156+03:00" ChangedBy="admin" URL="/Home" Depth="1" isopen="true" iscurrent="true" providerName="Default" isBlocked="false" xmlns="">
  <Page Id="465e8e08-6068-4a65-b313-934324d7c6a8" Title="2 Columns" MenuTitle="2 Columns" UrlTitle="2Columns" Description="" ChangedDate="2011-07-20T12:48:33.3725001+03:00" ChangedBy="admin" URL="/Home/2Columns" Depth="2" isBlocked="true" isInherited="false" extranetGroups="5880857b-1fc0-46b6-8de8-b4c5bb730826"/>
  <Page Id="b6a13c6c-2b13-4df7-bdcf-282dbbba3635" Title="3 Columns" MenuTitle="3 Columns" UrlTitle="3-Columns" Description="" ChangedDate="2011-07-20T12:48:33.5135081+03:00" ChangedBy="admin" URL="/Home/3-Columns" Depth="2" isBlocked="false" />
</Page>
Back to top
Part of subscriptions:

Have a question?

Phone: +45 39 15 76 00
Email: Write us
8:03 AM
(Local time at HQ)