Re: A simple question about ordering of posts

will kahn-greene <[email protected]> Tue, 02 Feb 2010 09:42:22 -0500
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On 02/02/2010 05:20 AM, chombee wrote:
>
> So it looks like to change the template for every entry that is about to
> be rendered you'd have to iterate over entries, something like:
>
>      def cb_prepare(args):
>          request = args['request']
>          data = request.get_data()
>          if data['bl_type'] == 'dir':
>              entrylist = data['entry_list']
>              for entry in entrylist:
>                  entry['template_name'] = 'story-index'
>
> (Assuming the entries come as dictionaries like that, but you get the
> idea.)

Entries are not necessarily dicts, but they are dict-like!  See 
Pyblosxom.entries.base and Pyblosxom.entries.fileentry.

/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