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