Home > Contents > Index >
Template Tags TOC   |    Alpha TOC   |    Tag Family TOC   |    Purpose TOC   |    Annotated TOC   |    Index 

 

siteplan:children

Queries the SitePlanTree table and then builds a list of the child nodes (pages) for the specified node (page).

Syntax

Parameters

name (required)
Input. Name of the parent node whose children you want to list. This parent node must be loaded and assigned a name before you can pass its name to this tag. (See siteplan:load .)

list (required)
Input. Name to assign to the list of the node's children. This list holds values for all of the fields in the SitePlanTree table. If a list with this name already exists, it is replaced.

objectype (optional)
Input. Restricts the list to nodes of a specific type and that type should always be "Page." You can combine this parameter with objectid to request one specific node.

objectid (optional)
Input. Object ID of a specific child node. If you supply objectid, you must also supply objectype.

code (optional)
Input. Name of the association that describes the relationship between the child node and the parent node. Valid codes are Placed and Unplaced.

order (optional)
Input. Fields to sort the list by and whether the sort on those fields is ascending (asc) or descending (desc). By default, the sort is ascending. If you specify more than one field, separate the field names with a comma.

For example, if you specify order="nrank", the list is sorted by rank starting at number 1. If you want the list sorted by descending rank, use
order="nrank, desc".

Description

This tag queries the SitePlanTree table for a list of the child nodes of the node that you specify, listing each child with a value for all of the fields from that table (nid, nparentid, nrank, otype, oid, and ncode). You must load the parent node (siteplan:load ) before you can invoke this tag to query for and list its children. The list is a standard Content Server list.

You can restrict the list of children nodes by association name (code), object type, object ID, and rank (order).

If you specify objectype="Page", the list of children is a join of the SitePlanTree and the Page table. In other words, you do not need to perform a subsequent siteplan:load or asset:load (both of which are direct database queries that take time) to obtain information about the child pages. You do need to use more siteplan:load tags if you want to continue traversing the hierarchy in the SitePlanTree table; that is, if you want to extract grandchildren pages, and so on.

errno

The possible values of errno include:

Value
Description
-111
The asset has no children.
-10004
A required parameter is missing.
-10005
The requested object is not in the object pool (is not loaded into memory).
-10006
The object ID is not valid.
-10007
The version of the object is not valid.

Example

This code extracts the child pages for the page asset identified as "parentNode," stores them in the list named "PlacedPages," orders them by rank, and restricts the list to include only placed pages:

See Also

siteplan:listpages

  Home > Contents > Index >

FatWire JSP Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.