[pmwiki-users] Categories now explicitly filtered from trails?
Patrick R. Michaud
pmichaud at pobox.com
Sat Jun 10 02:14:28 CDT 2006
On Fri, Jun 09, 2006 at 10:34:13PM -0700, Martin Fick wrote:
> Patrick,
>
> While analyzing PITS/00633, it seems like categories
> are now being explicitly filtered from trails. Is
> this by design? If not, can it be fixed?
It's by design. At the moment the way to get a
category into a trail is to use [[Category/XYZ]]
instead of [[!XYZ]].
>
> In the ReadTrail() function:
>
> if (!preg_match("/^([#*:]+) \\s*
>
> (\\[\\[([^:#!|][^|:]*?)(\\|.*?)?\\]\\]($SuffixPattern)
> | (($GroupPattern([\\/.]))?$WikiWordPattern))
> (.*)/x",$x,$match))
>
> The ! filters out categories, simply remove it and it
> will no longer filter them,
Removing the ! will keep the trail markup from filtering
the categories, yes, but ReadTrail still won't recognize
them as categories (because [[!XYZ]] is currently handled
as a markup rule, not by the page name builder).
It's been suggested in the past that we adjust MakePageName()
so that it recognizes "!XYZ" as a shortcut for "Category.XYZ"
(which would cause ReadTrail() to start working) -- but I'm not
ready to commit to that change just yet. I don't want to encode
any more special cases into MakePageName() before I have a
better idea of how I'll be handling case-insensitive links,
spaces, and pagenames with special characters in them.
Enabling [[!XYZ]] links in trails doesn't seem that high a
priority, especially since one can just as easily do [[Category/XYZ]],
and links to category pages would seem to be somewhat rare in
trails. But I'm willing to be convinced otherwise if there's
a good argument for it (or enough votes :-).
Pm
More information about the pmwiki-users
mailing list