Home > Contents > Index >
Template Tag 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. The 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.

OBJECTTYPE (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. The object ID of a specific child node. If you supply an OBJECTID, you must also supply an OBJECTTYPE.

CODE (optional)
Input. The 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. The 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.

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 Sites list.

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

If you specify OBJECTTYPE="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.

Error Numbers

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.LOAD
SITEPLAN.LISTPAGES

  Home > Contents > Index >

Oracle XML Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.