WCI Data Tags
Tag communityhierdata

This tag takes one or more community ids and creates a hierarchical data collection of Subcommunities and Community pages for the specified communities. Hierarchical data tags are used with display tags with nested data such as a tree or multi-level dropdown menus.

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:

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

Tag Information
Tag Namecommunityhierdata

NameTypeRequiredDefault ValueDescription
commidstringfalsenullA single Community id or comma separated list of Community ids values (as opposed to the commdataid attribute which takes the id of a tag variable containing the Community ids). A valid value for this or the commdataid attribute is required.
commdataidstringfalsenullTakes a tag variable id to a data tag with either a single or multiple Community Ids. A valid value for this or the commid attribute is required.
commdatascopestringfalseportlet requestTag scope for commdataid attribute. Only used if there is a value for commdataid.
includepagesbooleanfalsetrueInclude Community pages in the hierarchy or not.
maxdepthintfalse3The maximum levels of sub-Communities to create structure for.
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.