|
From: Chris G <cl...@is...> - 2010-02-01 11:24:52
|
On Sun, Jan 31, 2010 at 09:58:54PM -0500, will kahn-greene wrote: > 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. > I found this callback in the code when I was copying duplicates blosxom_file_list_handler() as I had to have a copy of the code which is called as the default truncatelist for blosxom_file_list_handler() to work. > 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. > Should it be added to the documentation? (cb_truncatelist that is) Or is it too likely to cause problems? > 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. > Well I do I suppose. :-) -- Chris Green |