Re: Setting depth with the flav_config plugin
Robert Wall <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
Reposting this to the users list (I sent it to devel earlier).
Stuart Langridge wrote:
> I thought you might say that, and I have contacted the plugin author.
I'm don't know who you contacted, but I didn't receive any mail from you
and I wrote flav_config!
> However, I'll then ask a more general question: where in the callback
> chain should I insert a plugin which can limit the "depth" setting on a
> directory-by-directory basis?
>
I think Will answered this in a later mail...the filelist plugin is
where the entries are Walk-ed and hence where the depth setting is used.
Another suggestion for setting the depth (untested but should work if
you adjust the startswith to include your pyblosxom script name etc.),
is to use the following in your config.py:
import os
if os.environ.has_key("PATH_INFO") and \
os.environ["PATH_INFO"].startswith('/photos'):
py["depth"] = 1
else:
py["depth"] = 0
One last thing is that the flav_config plugin will not even set the
number of entries correctly in the forthcoming pyblosxom version 1.1.
This is because the number of entries will be truncated in the filelist
plugin.
I've removed the depth example from the plugin and added a note about
the 1.1 problem.
Robert
--
http://robwall.com/
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/