WCI Data Tags
Tag currrelatedcommunitiesdata

Creates a list of data collections with the link information for the Related Communities (other Communities in same level on the Admin Hierarchy) of the current Community.

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.

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
currpage: This property is only set on the data collection item containing information about the current page or community. Check for this property to locale the currently active Page or Community in a list of Pages or Communities. This allowsyou to for example bold the name of the currently active Page or Community.

<pt:ptdata.currrelatedcommunitiesdata pt:id="relcomms" />
<pt:logic.foreach pt:data="relcomms" pt:var="curr" /> //display values for each community page
    <pt:logic.value pt:value="$curr.commid"/> // Community Id
    <pt:logic.value pt:value="$curr.commname"/> // Community Name
    <pt:logic.value pt:value="$curr.url"/> // URL to the page

Tag Information
Tag Namecurrrelatedcommunitiesdata

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.