Re: A simple question about ordering of posts

will kahn-greene <[email protected]> Sun, 31 Jan 2010 21:58:54 -0500
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On 01/31/2010 11:16 AM, Chris G wrote:
> Yes, I've got this done, I have a cb_filelist which essentially
> duplicates blosxom_file_list_handler() but without the reverse of the
> sort order.

You could cheat and use the truncatelist callback which kicks of after 
the entrylist is sorted in blosxom_file_list_handler.

It'd look something like this:

from Pyblosxom.pyblosxom import blosxom_truncate_list_handler

def cb_truncatelist(args):
     entrylist = args["entry_list"]
     entrylist.reverse()
     args["entry_list"] = entrylist

     return blosxom_truncate_list_handler(args)


This fails miserably if you have other plugins that implement the 
truncatelist callback and want to do other things.  For example, I have 
a wbgpager plugin that implements truncatelist to provide paging and the 
above cb_truncatelist would hose that.

I almost added a sort callback for 1.5.  I'm pretty sure blosxom has 
one.  If any of you think it'd be useful to have, I can add it in a 
jiffy for 1.5.

/will

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com