• #arguments.q['Title'][arguments.i]# - #arguments.q['level'][arguments.i]#
  • #customTreePrint(arguments.q, arguments.i+1)#
    aedCFC

    Front End

    How your code can be displayed externally

    To retrieve the nodes placed in the tree you may call getTree(id) found in the tree.cfc, which is in the aed directory. This function returns a query of all the table elements including an extra column called "level" indicating which level of the tree that row is on.

    The lone parameter of getTree() is the id (int) of the node to be treated as root. Your must set the dsn and table name in the initTree(dsn, table) before using other tree.cfc functions. I have used a small recursive function here and a few styles to display the tree that has been built using the "tree" view.