Page 1 of 1
Multiple category hiding
Posted: Sun Oct 23, 2005 7:12 am
by judebert
The Category sidebar plugin is having some trouble with option interactions. In particular, if you pick "Hide categories that are not part of the subtree" and "Allow visitors to display multiple categories", AND a vistor actually chooses multiple categories, THEN Serendipity won't display any categories when its viewing the entries.
Additionally, when a visitor chooses multiple categories, Serendipity will only display the number of entries per page as configured for the first category. This is especially annoying when "entries to display on front page" is set to "1" for the top category; I get 10 pages for 10 entries.
Re: Multiple category hiding
Posted: Mon Oct 24, 2005 12:22 pm
by garvinhicking
That is right. The dependency of multiple categories is really hard. The reason is easy: Serendipity cannot know which template and which options to display, when multiple indepedent categories are chosen. So at least the pagination issue cannot be fixed, at least I see now way.
The thing about that hidden categories seems to be fixable, I will try to look into that. However it might boil down to the same problem that s9y can't know which pagetree you are selecting.
Regards,
Garvin
Re: Multiple category hiding
Posted: Mon Oct 24, 2005 7:38 pm
by JWalker
garvinhicking wrote:That is right. The dependency of multiple categories is really hard. The reason is easy: Serendipity cannot know which template and which options to display, when multiple indepedent categories are chosen. So at least the pagination issue cannot be fixed, at least I see now way.
Pagination: What about a global variable i.e. $multicat_entries_per_page, that will be used only when more than one category are selected to be displayed ? This variable may be user-configurable and stored in the blog configuration in the database.
Re: Multiple category hiding
Posted: Mon Oct 24, 2005 7:44 pm
by garvinhicking
Hm...instead I'd suggest to hack the plugin to insert a special value when crossjoined categories are found?
But that's the best idea I've heard so far - but needs another config option which is a bit dirty?!
Regards,
Garvin
Posted: Mon Oct 24, 2005 8:04 pm
by JWalker
Yes, such special value is not avoidable, it is needed, and it may hard-coded, I think '5' is good value. And you are right, it's a bit dirty when stored in the database - some value, stored somewhere .... I suppose it's place is in the internal 'Category" plugin configuration if the user will be allowed to change it.