I recently spent a lot of time in the categories, so I think I can 
help.  All my stuff is tied to webservices/flex, but I also had it 
working tied in to the customadmin.  So I would have no worries about it 
running from a dmInclude.

This will get you all the descendants of a given node.  I added a helper 
fn so that I can simply alias the category where I want to start.

        qDescendants=request.factory.oTree.getDescendants(
            dsn = application.dsn
            ,objectid = extractCategoryIdFromAlias( 
"yourStartCategoryHere" )
            ,bIncludeSelf = false
        );


    <cffunction name="extractCategoryIdFromAlias" returntype="uuid" 
access="public">
        <cfargument name="rootAlias" type="string" required="false" 
default="objectives" />
        <!--- get a list of all categories w/aliases --->
        <!--- this will return a structure indexed by alias --->
        <cfset var stAliasCats = instance.oCat.getCatAliases() />

        <cfif not structKeyExists(stAliasCats, rootAlias) >
            <cfthrow message="No category w/the name 
#arguments.rootAlias# exists.  This is probably a misconfiguration." />
        </cfif>

        <cfreturn stAliasCats[rootAlias] />
    </cffunction>





Chris Roth wrote:
> Does anyone have or know of in core or  somewhere a function that will
> allow me to retrieve an array of categoryIDs/Names at a specific level
> retuning only immediate children and not self or grandchildren?
>
>
> >
>   



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to