diecasthft
asked on
Question with CFTREE, or how to build a tree in Coldfusion
I have a need to build a web site, and I think to make getting to various data easy, I wanted to build a tree in my web site, based on data from an Oracle database. Going through the Coldfusion books I have, I was looking to use CFTREE, and in theory, that works. It puts the data in the tree that I need. My problem is that I need to be able to click on the results of the tree and open a url. That works too, but not in the right place. For instance, in my tree, I have a main folder called Subtitles, then I have to folder under it, one called Family Life Center and another called Family Life Center 1 and this is retrieved from my database. If I click either one, I can open a url....but that's not where I want the url. Under each sub folder, is an entry from the database related to the Family Life Center or Family Life Center 1. In this case, called Review and Review1. I want the url on that, not on the folder, but I can't seem to get that to change. Is there a way to change the location of the url in CFTREE or is there a better way to get a database driven tree in my web site?? Thanks in advance for any help with this!! (My code is listed below
<cfquery datasource="MCA_Oracle" name="Subtitles">
SELECT CON_ACT.PROJECT_DESCRIPTIO N_2, CON_ACT.REVIEW_TYPE, CON_ACT.ID
FROM MCA.CON_ACT
WHERE CON_ACT.ID = '92408150812'
ORDER BY CON_ACT.REVIEW_TYPE, CON_ACT.PROJECT_DESCRIPTIO N_2
</cfquery>
<cfset id = '92408150812'>
<CFFORM FORMAT="flash">
<cftree name="treeReview"
height="400"
width="500" highlighthref="yes" appendkey="yes">
<cftreeitem query="Subtitles"
value="PROJECT_DESCRIPTION _2,REVIEW_ TYPE"
display="PROJECT_DESCRIPTI ON_2,REVIE W_TYPE"
expand="YES" parent="REVIEW_TYPE" href="dfgsdfsdf.cfm?id=#id #" >
</cftree>
</CFFORM>
<cfquery datasource="MCA_Oracle" name="Subtitles">
SELECT CON_ACT.PROJECT_DESCRIPTIO
FROM MCA.CON_ACT
WHERE CON_ACT.ID = '92408150812'
ORDER BY CON_ACT.REVIEW_TYPE, CON_ACT.PROJECT_DESCRIPTIO
</cfquery>
<cfset id = '92408150812'>
<CFFORM FORMAT="flash">
<cftree name="treeReview"
height="400"
width="500" highlighthref="yes" appendkey="yes">
<cftreeitem query="Subtitles"
value="PROJECT_DESCRIPTION
display="PROJECT_DESCRIPTI
expand="YES" parent="REVIEW_TYPE" href="dfgsdfsdf.cfm?id=#id
</cftree>
</CFFORM>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER