Earle Martin wrote:
On Tue, Jul 26, 2005 at 02:38:19AM +0200, IvorW wrote:
I have a radical proposal. The basis of it is "What good is a default autocreated category or locale with no nodes?".
Since the answer is "not a lot", why don't we just delete them?
I actually think we should dump autocreation altogether.
It's frustrating to click on a category title in the categories section only to receive a blank stub.
Not strictly correct. The stub page will contain the line
@INDEX_LINK [[Category Foo]]
which is considerably better than nothing. Empty pages are annoying, but many of our categories and locales are just an INDEX_LINK.
It means the behaviour of a link varies depending on where you click it.
I guess we're not seeing this because the cat & loc pages get autocreated on save (which is a bad thing, I think I agree).
Suppose you have a Category Foo but not Category Bar, and a page that looks like this (underscores denote links):
Something Or Other
Address: 1 Any Street Categories: _Foo_, _Bar_
Something or other is a place with lots of Foo and Bar.
For more Bar, see [Category Bar]_?_.
Now, which link do you think people will click on if they're new to the whole system? I'd bet you it'd be the one at the top. But all they'd get would be a blank page. This is a situation you can easily test out for yourself.
I think if a category doesn't exist, a link to it in the categories display should have the question mark, just like a regular link to it would. Keep it simple.
What you are suggesting makes sense. This would mean reusing the link rendering logic that detects whether a page exists, into the rendering of the metadata fields.
Thoughts please, everyone? This has been nagging at me for a while and I'd like to do something about it.
I've been thinking about a different approach. My alternative is to limit the selections allowed to pre-existing categories and locales. These are presented in a dropdown select list with "Add" and "Remove" buttons. There's no freeform textarea for spammers to type in pseudo categories.
I think that most of the work can be done in template logic. But it will mean passing in lists of all categories and locales to the hash.
My £0.02
Ivor.