Hello,

I'm trying to create windows explorer style directory structure. And I'm some issues. My folder end up nesting inside of themselves.

Here is my code its a custom tag that calls itself when it finds children

<cfoutput>

<cfif isdefined("attributes.parentItemIdx")>
<cfset parentItemId=#attributes.parentItemIdx#>

<cfelse>
<cfset parentItemId = 0>
</cfif>

<cfquery name="get_parents"
SELECT
*
FROM
participant_assess_actn_doc
WHERE
path_name = '#parentItemId#'
ORDER BY
file_name
</cfquery>

<cfloop query="get_parents">
    <cfif get_parents.recordcount gt 0>
<div id=#get_parents.participant_assess_actn_doc_id# class='FolderOff' > <cfelse>
<div id=#get_parents.participant_assess_actn_doc_id# class='FolderOff' > </cfif>
<img src='' border='0' id='folder#get_parents.participant_assess_actn_doc_id#'>
<span id='texthtml#get_parents.participant_assess_actn_doc_id#' value='#get_parents.participant_assess_actn_doc_id#'>#file_name#</span>
</div>
<cfquery name="get_children">
SELECT
*
FROM
participant_assess_actn_doc
WHERE
path_name = '#get_parents.participant_assess_actn_doc_id#'
</cfquery>




<cfif get_children.recordcount gt 0>
<span class='branch' id='branch#get_parents.participant_assess_actn_doc_id#'>
</cfif>
<cfif #get_parents.participant_assess_actn_doc_id#  EQ #parentItemId#>

<cfmodule template="JMenuBuilder.cfm"  qass_data_source="d018_reacs_qass" parentItemIdx= "#get_parents.participant_assess_actn_doc_id#">
</CFIF>
</CFLOOP>
</cfoutput>

Thanks in advance for any help :)
Metzy
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to