[Pmwiki-users] Re: Re: Categories instead of hierarchies?

chr@home.se chr
Thu Oct 28 13:58:42 CDT 2004


On Thu, 28 Oct 2004, Patrick R. Michaud wrote:

> On Thu, Oct 28, 2004 at 05:08:15PM +0200, chr at home.se wrote:

> I'm really against (:!XYZ:) for a variety of reasons--it starts us down the
> slippery slopes of (1) using punctuation as directive names and (2) tying
> directive syntax to the link syntax.  I'd much prefer:
> 
>     (:category XYZ 2004 Horror:)

I not to fond of (:!XYZ:) either, it was merely used to illustrate a 
point. I also prefer (:category ...:), but I think we need to use e.g. ',' 
as a separator between the elements, as in this example

	(:category XYZ,2004,Horror:)

> It also means building a lot of extra support for categories into the
> base code.

I don't quite see how this requires a *lot* of extra support, but then 
again I haven't been thinking about how it should be implemented either.

> Traditionally "wiki categories" have been built on top of the linking
> and search features that are already in the wiki, implementing
> categories in this way means basically creating and maintaining a whole
> "shadow" system of links.
>
> I'm not necessarily saying this is a bad thing to do, but it is a fair
> amount of extra (and duplicative) code and it will tend to cause big
> surprises for people who are familiar with wiki categories in the
> traditional sense.  If we go this route I'd almost prefer to call it
> something other than "categories".

I don't think we have to introduce e.g. (:category ...:) at once. It was
more intended as something that I think will be "needed" quite soon when
people start using it.

> In this case the answer may be to embrace the link syntax rather than
> avoid it.  If the question is simply one of being able to create a link
> to a category without displaying it, how about using something
> like [[!XYZ|]] or [[->!XYZ]]?  (Note the link text is empty, which would
> indicate the category link is created but not displayed.)

> 
> > where I pretend that [[!]] automatically creates links to all category 
> > pages that the current page belongs to. 
> 
> And here [[!]] seems particularly cryptic to me

I actually hate it, but didn't have time to come up with a more clever 
syntax. And there where all these earlier '!' all over the place.

> Thus I think I'd prefer {$Categories} or (:categorylist:) as a way
> to display the categories the current page belongs to.

I thought about using e.g. {$Categories$}, but couldn't figure out how to
turn that into a list. Something like (:categorylist:) with format
parameters seems much better. 

> With {$Categories}, one could likely do something like:
> 
>     Categories: [[!XYZ]], [[!ABC]]
>     Bla, bla
>     ...
>     Categories: {$Categories}

Oh... you mean that {$Categories} would render as links? I thought
variables usually where simple text. Hmm... I think I'd still prefer
something like (:categorylist fmt=horizontal:) to get the category links.

/Christian

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list