Sun Java System Portal Server 7.1 Community Sample Guide

Template Syntax and Semantics

Each template is made up of one or more role templates (member.xml, owner.xml, visitor.xml) in XML format. The template directory includes the XML files for the roles that it will serve; for example, member.xml for the community member, owner.xml for the community owner, and visitor.xml for the community visitor.

Each role template is a display profile document for community users in that role. The file must be based on the display profile DTD.

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<DisplayProfile version="1.0" priority="%COMMUNITY_DP_PRIORITY%">
	<Properties/>
	<Channels>
		<Container name="%COMMUNITY_CONTAINER%" provider="JSPTableContainerProvider">
			<Properties>
				<String name="title" value="%COMMUNITY_NAME%"/>
				<String name="description" value="%COMMUNITY_DESCRIPTION%"/>
				<Boolean name="compileToRealPath" value="true"/>
			</Properties>
			<Available>...</Available>
			<Selected>...</Selected>
			<Channels>...</Channels>
	</channels>
	<Providers/>
</DisplayProfile>

The tokens (surrounded by %), described below, in the display profile are dynamically replaced by actual values by the template engine when a community is created.

%TOKEN_COMMUNITY_NAME%

Specifies the (user-friendly) name given to the community. For example, tourists.

%TOKEN_COMMUNITY_ID%

Specifies the unique string identifying the community. This name is strictly an internal representation and does not get exposed in the user interface. For example, jdo__tourists.

%TOKEN_COMMUNITY_DESCRIPTION%

Includes a description of the community.

%TOKEN_COMMUNITY_CONTAINER%

Specifies the top-level container for the community. For example, jdo__touristsContainer.

%TOKEN_COMMUNITY_DP_PRIORITY%

Specifies the display profile merging priority given to the resulting community display profile. Each role is given a different value. By default, 1000 for the visitor role, 1005 for the member role, and 1010 for the owner role.

%TOKEN_COMMUNITY_SEARCH_URL%

Specifies the Search server URL for the community.

%TOKEN_COMMUNITY_CONTENTS_SEARCH_DB%

Specifies the search database for the community content.

%TOKEN_COMMUNITY_DISCUSSIONS_SEARCH_DB%

Specifies the discussions database.