On Sep 11, 10:16 am, Chris Roth <[EMAIL PROTECTED]> wrote: > I want to have a little "top 3 files" display on a page.. since this > is in just one small spot, I have decided to not write a rule, but > just include a temmplate. > > I found what I needed in stats and can geta list using: > > <cfscript>qGetTopFiles = > application.factory.oStats.getMostViewed(typeName='dmFile',dateRange='m',maxRows=3);</ > cfscript> > > Once I have that list, I'd like to get the dmFile's description (Since > I already get back title and objectid).. whats the most efficient way > to get data on the dmfile?
Perhaps surprisingly the best approach is to call the entire object. Objectbroker kicks in and auto caches that data and potentially any views you might have associated with it. I'd probably recommend looping over <skin:view... /> and rendering some kind of teaser template to output the file details. That tag will handle the object and view call all in one without any need to make pesky function calls. -- geoff http://www.daemon.com.au/ PS. note stats is deprecated in 5.0 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
