Re: A simple question about ordering of posts
chombee <[email protected]> Mon, 1 Feb 2010 17:36:03 +0000
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <20100201173603.GB7380@kisimul> |
On Mon, Feb 01, 2010 at 04:19:10PM +0000, Chris G wrote:
> On Sun, Jan 31, 2010 at 06:54:46PM +0000, chombee wrote:
> Well I've tried tha above and, so far, I can't get it to work. I'm
> detecting the 'file' and 'dir' for single/multiple entries OK.
> So my plugin looks like this:-
>
> def cb_story(args):
>
> logger = tools.get_logger()
>
> e = args['entry']
>
> if (e['bl_type'] == 'dir'):
> logger.info("It's a 'dir' so set the template_name to 'story-index'")
> e['template_name'] = 'story-index'
>
> return args
Sorry, I think the key is 'template' not 'template_name'. In another
callback it was definitely 'template_name', but the docs for cb_story
say:
"The template used is typically the story template, but we allow entries
to override this if they have a template property. If they have the
template property, then we’ll use the template of that name instead."
Funny, I notice that the docs also say: "Functions that implement this
callback must return the input args dict whether or not they adjust
anything in it." But the cb_story in the readmore plugin doesn't return
anything.
------------------------------------------------------------------------------
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
_______________________________________________
pyblosxom-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyblosxom-users