Here's the code I use (pulled from one of our Farcry util CFCs):
<cffunction name="getObjectsUnderNav" access="public" returntype="query" output="false">
<cfargument name="navid" type="uuid" required="true" />
<cfargument name="type" type="string" required="false" default="dmHTML" />
<cfargument name="parenttype" type="string" required="false" default="dmNavigation"/>
<cfargument name="parentcolumn" type="string" required="false" default="aObjectIDs"/>
<cfset var qDescs = 0 />
<cfquery name="qDescs" datasource="#application.dsn#">
select t.*, tree.* from #application.dbowner##arguments.parenttype#_#arguments.parentcolumn# n
left join #application.dbowner##arguments.type# t on t.objectid = n.data
left join #application.dbowner#nested_tree_objects tree on tree.objectid = n.data
where n.objectid = '#arguments.navid#'
and t.objectid is not null
order by seq asc
</cfquery>
<cfreturn qDescs />
</cffunction>
- tim
On 21/01/2005, at 9:52 AM, Jeff Coughlin wrote:
Jeff Coughlin wrote:I am trying to find if there are any dmHTML or dmIncludes in my parent dmNavigation object but don't know how. Any idea?
I've now spent about 14+ hours trying to figure this out. I could only seem to come up with a solution by making my own query. I'm not happy with using this as an option but I don't know any other way to do this. I'll probably put this into a custom CFC. If anyone has a cleaner solution please let me know.
Here's what I came up with:
<cfset myParentID = application.factory.oTree.getParentID(objectid="#request.navid#").Paren tID[1] />
<cfquery name="qAObjectIDs" datasource="#application.dsn#">
select *
from dmNavigation_aObjectIDs
where objectid = '#myParentID#'
</cfquery>
<cfloop query="qAObjectIDs">
<cfset thisType = application.factory.oGenericAdmin.FindType(objectid=data) />
<cfif thisType eq 'dmHTML' or thisType eq 'dmInclude'>
Do Something
</cfif>
</cfloop>
--- You are currently subscribed to farcry-dev as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
