Re: A simple question about ordering of posts

will kahn-greene <[email protected]> Mon, 01 Feb 2010 16:56:01 -0500
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On 02/01/2010 04:50 PM, chombee wrote:
> On Mon, Feb 01, 2010 at 02:17:08PM -0500, will kahn-greene wrote:
>> The "template" in the args dict in cb_head, cb_date_head, cb_story,
>> cb_story_end and cb_foot callbacks is an actual template--it's not the
>> name of a template.  These callbacks are renderer callbacks.
>
> Then it sounds like we're using the wrong callback. What we want to do
> is change the template file that gets used, i.e. we want to change
> template_name. We need a callback that will allow us to change
> template_name, but only if the request is for a directory view not a
> file view, so the callback needs to be able to tell what kind of view
> was requested also. Our problem is just that we're still learning our
> way around the callbacks and the life cycle of a pyblosxom request.

You're probably looking for the prepare callback which allows you to 
change things just before rendering.

The lifecycle section of teh dev_architecture page should cover this, 
but it seems to do so in a difficult to read fashion.  That should 
probably get reworked.

/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