User Guide

cftree 433
The structure variable name is specified by the cftree name attribute. The top level of the
structure has two types of entries:
Attribute settings
A children array
Attribute settings
The structure has top-level entries with the values of the following cftree attributes:
Children array
The top-level children entry is an array of items entries. Each item has the following entries:
Example
The following example creates a tree that shows available courses from the CourseList table of the
cfdocexamples database, and puts each department’s courses in a folder. This example is displayed
in Flash and uses the Departments list to get department names.
<cfquery name="getCourses" datasource="cfdocexamples">
select d.dept_name, c.course_id, c.CorName, c.CorLevel, c.corName +' ( '
+c.corLevel +' )' as corLabel
align completePath highlightHref lookAndFeel
appendKey delimiter hScroll name
bold fontWeight italic vscroll
border
Field Value
children This item’s child items; an array of item structures.
display Tree item label, as determined by the
cftreeitem display attribute.
expand Whether to expand the item to display any children; value of cftreeitem
expand attribute.
href The URL to link to when the user selects the item; value of the
cftreeitem
href attribute.
img The tree image icon Image to display as an icon for the tree item; value of
cftreeitem img attribute.
imgOpen Image to display when the tree item is open (expanded); value of
cftreeitem imgopen attribute.
parent Value of this item’s parent item in the tree.
path The node path from the tree root to the current element.
queryAsRoot Whether the query is the root of the item; value of
cftreeitem queryAsRoot
attribute.
target The link target, such as _blank; value of the item’s
cftreeitem target
attribute.
value The item’s value, as determined by the
cftreeitem value attribute.