[Pmwiki-users] Re: Re: Categories instead of hierarchies?
Patrick R. Michaud
pmichaud
Thu Oct 28 14:28:08 CDT 2004
On Thu, Oct 28, 2004 at 09:58:25PM +0200, chr at home.se wrote:
>
> (: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.
...figure out how you're going to find all of the pages that belong to
category XYZ. Since (:category XYZ:) no longer creates a link to
Category.XYZ, you can't just do a backlinks search to find all of the
pages in the XYZ category. You could try searching for the (:category XYZ:)
markup itself, but you also have to make sure that it hasn't been
escaped by [=...=] or [@...@] somehow, and searching for literal
"(:category XYZ:)" doesn't help you if the author wrote
"(:category 2004, XYZ:)" --you have to build a really good pattern match.
Add to this that you still have to search for the [[!XYZ]] links as well,
and you now need a specialized "category search" function that is
fairly expensive to implement. Or, you have to have each page save its
list of categories (linked and non-linked) to a separate field when it's
written, which means writing code to update/maintain this extra field on
save, and we *still* need the specialized category search.
It's just much nicer when you can do a simple search for 'Category.XYZ'
or '[[!XYZ]]' and take advantage of the linkages and processing PmWiki
already has.
Pm
More information about the pmwiki-users
mailing list