Re: Setting depth with the flav_config plugin

will guaraldi <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On Sat, 4 Dec 2004, Stuart Langridge wrote:
>
> Ah, that doesn't operate well with depth settings that aren't zero. 
> Imagine a site with categories:
>
> weblogging_systems (with no posts)
> weblogging_systems/pyblosxom (with 2 posts)
> weblogging_systems/movable_type (with 3 posts)
>
> With depth set to 0 (or anything greater than 1) visiting 
> http://site/pyblosxom/weblogging_systems will show 5 posts: no problem. 
> However, for my photo gallery, I don't want every photo in a subcategory 
> to show up in higher level categories. So, in the example above, 
> http://site/pyblosxom/weblogging_systems should say "no posts in this 
> category: there are the following subcategories; drill down further". 
> That's not quite the same thing as a 404, which is "there's nothing here 
> at all"; that would be misleading to users, I think. So what I'd like to 
> do is override the 404, and I don't think there's an easy way to do 
> that...

I see what you're doing.  You don't want to override the 404 because the 
404 has a specific meaning, you just want to handle the case where there 
aren't any entries.  So you should do a callback that uses the prepare 
hook and checks to see if there are no entries and the user is looking at 
photos.  If that's the case, then it should create an entry with the 
message you have above.

/will


-------------------------------------------------------
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.