Have a look at the tree component in farcry.core.packages.farcry. I believe
it handles both dmNavigation and category trees. If that doesn't help, you
could do a query directly on nested_tree_objects. The tree is stored as
nested sets. You should be able to find some sql examples of nested set
trees with a quick google search.

Blair

On 8/10/07, Chris Roth <[EMAIL PROTECTED]> wrote:
>
>
> How is a category's position stored in te category tree? I have a page
> that would puts categorized objects.
>
> I'd like to be able to group the output by category in the same
> "order" the categories are listed in the tree.
>
> I am using the query below (borrowed from a rule somethere), which is
> obviously not going to work as far as the sort order, though it does
> group the objects properly.
>
> <cfquery datasource="#application.dsn#" name="qGetItems">
> SELECT DISTINCT type.objectID, type.datetimelastupdated, type.label,
> refCat.categoryID
> FROM refObjects refObj
> JOIN refCategories refCat ON refObj.objectID = refCat.objectID
> JOIN myTypeName type ON refObj.objectID = type.objectID
> WHERE refObj.typename = 'myTypeName'
> AND refCat.categoryID IN ('#ListChangeDelims(lcatids,"','",",")#')
> AND type.status IN
> ('#ListChangeDelims(request.mode.lValidStatus,"','",",")#')
> AND datetimelastupdated <= #now()#
> ORDER BY refCat.categoryID,type.label ASC,type.datetimelastupdated
> DESC
> </cfquery>
>
>
> then to display...
>
> <cfoutput query="qGetItems" group="categoryID">
> <cfset CategoryName = objCategories.getCategoryNamebyID(categoryID)>
> <h4>#CategoryName#</h4>
> <cfoutput>
> <ul>
> <li><a href="#application.url.webroot#/download.cfm?
> downloadfile=#qGetItems.objectid#"
> title="#qGetItems.label#">#qGetItems.label#</a> - Last Updated:
> #DateFormat(qGetItems.datetimelastupdated,'mm/dd/yyyy')#
> </li>
> </ul>
> </cfoutput>
> </cfoutput>
>
> this obviously works well enough, but I'd really like to be  able to
> have the display using the category's treee order.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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