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

Patrick R. Michaud pmichaud
Thu Oct 28 10:08:10 CDT 2004


On Thu, Oct 28, 2004 at 05:08:15PM +0200, chr at home.se wrote:
> On 28 Oct 2004, John Rankin wrote:
> 
> > On Wednesday, 27 October 2004 8:34 PM, chr at home.se wrote:
> > >I think [[...]] should be a link, but I want to be able to mark a page as 
> > >belonging to category without creating a link. Using %Comment%[[!XYZ]]%% 
> > >seems nonintuitive for that purpose. But how about this:
> > >  (:!XYZ:)	- Mark page as belonging to XYZ
> 
> It shouldn't be rendered... the only purpose is to mark the page as
> belonging to category XYZ. I would like to be able to separate between the
> logical action of saying that a page belongs to a certain category, and
> the visual appearance bit that shows as a link to a cateogory page.

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:)

which adds a page to the XYZ, 2004, and Horror categories.  It also
means building a lot of extra support for categories into the base
code.  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".

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 -- by this point we're 
putting way too much emphasis on '!' as somehow meaning "Category", but
this is not a natural or established convention at all.  In the case of
[[~name]], there is precedence in the use of "~name" in filesystem paths 
and URLs, but I don't know of an equivalent precedence for categories.  

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

> If I'd only used [[!...]] in the example above, I'd have something 
> like this:
> 
> 	Categories: [[!XYZ]],[[!ABC]]
> 	Bla, bla
> 	...
> 	Categories: [[!XYZ]],[[!ABC]]
> where I have a "dependency" between the beginning and the end of the page. 
> If I decide to change the categories this page belongs to, I'll have to do 
> it both at the top of the page and at the end of the page.

With {$Categories}, one could likely do something like:

    Categories: [[!XYZ]], [[!ABC]]
    Bla, bla
    ...
    Categories: {$Categories}

Pm



More information about the pmwiki-users mailing list