WCI Data Tags
Tag currcommunitydata


Creates a single data collection containing the link information about the current Community, including the name, object id and URL to the Community home page.

The data collection is set in the specified Tag variable. By default, data tags store data collections in a list, even for a single collection. Data tags do not replace data in a Tag variable if something is stored there already but they append their new data to the existing data instead. Assembling a list of data from multiple data tags is done by specifying the data tags to use the same Tag variable. The downside with data collections stored in lists is that a single data collection is not directly referenceable using the '$' syntax. Instead of using a foreach tag to iterate over the list for a single data collection, use the 'noarray' attribute. See description for this Tag library for example.

Nothing is set in the Tag variable if the current page is not a Community page or if the current user does not have sufficient access to the current Community.

A data collection is a bag of "properties": name/value pairs where values are typically Strings. When assigned in tag variables, data collections and their properties are accessible in tag attributes through a special syntax: ${tag variable name}.{property name}

Example:   <pt:logic.value pt:value="$mytag.nameproperty" />

When the tag framework executes the tags, the expression is replaced with the property value in the data collection. See description of ptdata tag library for more information and examples of tag collections.

Data properties
This data collection contains the following data properties:

commid: Community id
commname: Community name
title: URL display string, usually the name of target the Page or Community
url: Full URL to the target page
uri: URI (part of URL after the server name) to the target page
img: URL to the Icon associated with the target page
imgheight: Height of the icon in pixels
imgwidth: Width of the icon in pixels
params: Query string of the target URL


If used on a User Profile Page:
classid: Contains the value "1"
commid: User id of the displayed User Profile
commname: Name of the user
pageid: User Profile Page Id
pagename: Name of the User Profile Page

Example:
<pt:ptdata.currcommunitydata pt:id="currcomm" pt:noarray="true" />
<pt:logic.value pt:value="$currcomm.commid"/> // get Community Id
<pt:logic.value pt:value="$currcomm.commname"/> // get Community Name


Tag Information
Tag Namecurrcommunitydata

Attributes
NameTypeRequiredDefault ValueDescription
idstringtruenullName of the variable in memory where the PTURL DO data created by this tag is stored. Specify this ID in the data attribute (most commonly the DATAVAR attribute) for any display tag consuming PTURL DO data. Multiple data tags can share the same ID, in which case they are added to a list in the order they were processed.
scopestringfalseportlet requestThe scope used to store the data. See Tagdoc for the logic tag library for a list of all available scopes.
imgstringfalsenullTakes an image URL used to override the default icon assigned to a data collection.This attribute only overrides icons for data tags returning a single data collection, such as, communitypagesdata or mycommunitiesdata
noarraybooleanfalsefalseSet this attribute to true to store the data tag variable as a single collection instead of a list of collection. The default behavior, setting this data as a list allows you to assemble multiple data into a list but prevents the data from being used directly in attribute replacement. The work around is to reference the data in a foreach tag. With noarray set to true, this data is usable in attribute replacement but cannot be added to lists of other data tags. This attribute only applies to data tags which set a single data entry, such as currcommunitydata or currprofiledata. It has no effects for tags which return a list of data entries, such as communitypagesdata or mycommunitiesdata.


Copyright 2005 Plumtree Software, Inc.