|
From: will kahn-g. <wi...@bl...> - 2010-02-01 21:56:08
|
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 |