Re: A simple question about ordering of posts

Chris G <[email protected]> Mon, 1 Feb 2010 22:45:00 +0000
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <20100201224500.GA4987@chris>
On Mon, Feb 01, 2010 at 02:17:08PM -0500, will kahn-greene wrote:
> On 02/01/2010 02:04 PM, Chris G wrote:
> > It's supposed to return args (the incoming argument list) as that's
> > where the story content that gets displayed (the $body) comes from.
> >
> > That's how I'm changing from 'ordinary format' to 'index format' at
> > the moment, be setting the 'body' in the returned args to nothing.
> >
> > Looking at the code I'm pretty sure the key is 'template_name', it
> > refers to that quite a lot in the rendered. However, as I said, I
> > think the renderer looks for the alternative 'template_name' *before*
> > cb_story() is called.
> >
> > Just tried 'template' instead of 'template_name', no difference.
> 
> I can't tell if the crux of the confusion in this thread is that there 
> are two different template keys used or not.
> 
> 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.
> 
> Prior to those callbacks getting called, you can override the template 
> that gets used to render an entry with the "template_name" variable in 
> the entry dict.  This is the name of the template to use to render the 
> entry.  By default, it's "story".  Changing "template_name" in the entry 
> dict will have NO effect if you're doing it in one of the renderer 
> callbacks because they're beyond template_name things and are working on 
> the actual template.
> 
Yes, I think I'd sort of got this far.

However I don't understand where one *can* change template_name so
that it takes effect.

-- 
Chris Green


------------------------------------------------------------------------------
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