Setting config values based on the current category
Asheesh Laroia <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
I wanted to have different directories (i.e., categories) show a different text banner (like where $blog_description appears) but otherwise keep the theme the same between them. I figured I would write a simple plugin that stored a dictionary mapping from directory name to long description string. I did that, and then I realized I needed to figure out the current URL requested. *That*'s where I got stuck. What's the right way to do that? I am using the cb_prepare() callback, which gives me an args that according to http://pyblosxom.sourceforge.net/1.4/manual/dev_architecture.html#cb-prepare is only guaranteed to have a request object. That's another thing - where is the request object documented? http://pyblosxom.sourceforge.net/1.4/api/Pyblosxom.pyblosxom.Request-class.html documents it in some fashion but doesn't really list all the attributes it should have, I think. I don't think I should be looking at the HTTP dictionary's contents for this; I would guess there's some more pyblosxomy place to look. I figure cb_prepare() is early enough so that I can insert values into the configuration dictionary and create variables for use in the flavour. Thanks! I'm still fairly green as far as customizing pyblosxom despite my on-and-off activity on this list. -- Asheesh. -- He that bringeth a present, findeth the door open. -- Scottish proverb. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/