I've
found the nested set model difficult to implement. The SQL for retrieving
the tree is easy enough, but updating it is pretty complex. And from what i
remember, you're dependent on using MSSQL, although varients probably exist for
other advanced DBMS's.
I
use a simple system that builds a page hierarchy using both a parentID and a
numeric level value that starts with 0 for the root of the tree and is
incremented by 1 for each level of the hierarchy. When adding a page under a
parent, the PK of the parent page goes in the parentID field of the new
page and the level value is incremented by 1. Simple. I use a recursive
function to create an ordered query so my display queries (QorQ's) are
efficient.
You
can do lots of nifty display things very quickly with a combination of
parentID's and level values and that recursive function. I can share some code
with you if you'd like. I'm sure you'd be able to figure out how to generate
your XML file using this approach as your foundation.
---------------------------------------------------------------Original Message-----Check out this article on the nested set model
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Phil Cruz
Sent: Tuesday, September 06, 2005 5:09 PM
To: [email protected]
Subject: Re: [CFCDev] Hierarchies
http://coldfusion.sys-con.com/read/42123_f.htm
hth,
Phil
On 9/6/05, chris.alvarado <[EMAIL PROTECTED]> wrote:Hello all,
I'm working on a project where i need to allow a user to build the structure for an online manual through some sort of form based tool.
The structure is hierarchical in nature, in that there are chapters which contain various pages and then those pages can even contain "sub pages". after the user build the structure of the manual the structure needs to be saved as an XML file. however, I've been having a heck of a time representing the structure in ColdFusion. does anyone have any pointers (tutorials, examples etc) of dealing with hierarchies in ColdFusion?
thanks for any help!
--
-chris.alvarado
[application developer] ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
