Re: A simple question about ordering of posts
will kahn-greene <[email protected]> Mon, 01 Feb 2010 14:17:08 -0500
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
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. Hope that helps! /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