[pmwiki-users] RFC: Indexing categories and links

DaveG pmwiki at solidgone.com
Wed Mar 3 23:20:04 CST 2010



On 3/3/2010 2:58 PM, Petko Yotov wrote:
> Hello.
>
> Many times, there have been requests about improving the way Pagelists with
> Backlinks are generated, particularly about the category feature.
>
>    (:pagelist link=Category.Name:)
>
<<SNIP>>


> * A pagelist with link=!Name will find only pages containing [[!Name]], which
>    is new. Only newly created (:pagelist link=!Name:) will display these pages.
I think this is useful, and personally the way I always assumed 
backlinks worked. I wonder though whether using the ! as the trigger is 
too subtle. Why not a new tag, like category=Name?

However, I don't feel strongly -- link=!Name is at least consistent with 
the !Category idea.


> This way, with a few changes of 3 or 4 core functions, it is possible to add
> the much requested feature, and to stay backwards compatible with all current
> installations. (WikiAdmins may need to remove the wiki.d/.pageindex file after
> upgrading to let PmWiki reindex the site.)
>
> So my first question is should we do this change?
I'd say yes.


> Another feature was suggested by Peter Bowers. We can have globally defined
> link prefixes like :
>
>    ! for Category
How would this form work in conjunction with the change above? If:
    $LinkPrefixGroup['!'] = 'Category';

And then I do [[!Tag1]] would that be treated differently to
    [[Category/Tag1]] or [[Category.Tag1]]

It would need to be in order for the first change to work, but then that 
suggests that these two are also different:
    $LinkPrefixGroup['@'] = 'Todo';

And then I do [[!Tag1]] would that be treated differently to
    [[Todo/Tag1]] or [[Todo.Tag1]]

If so, in what way?


<<SNIP>>
> Using a global way of dealing with links will fix some bugs we've had for a
> long time:
>
>    "[[!My category | Alternative text ]]" doesn't work in 2.2.14
>    "[[!My category |+]]" doesn't work in 2.2.14
>    "[[!My category]]suffix"  doesn't work in 2.2.14
>
> So my second question is should we enable this link-prefix feature?
I think this is a pretty neat feature, and if it fixes existing bugs, 
then that's great, and may be worth doing just for the bugs.

I'm not sure of that it's particularly valuable on it's own though -- it 
appears to be a shortcut to typing the Group part of a link? Is that 
correct? If so I may use it, but it wouldn't be something I'd vote for 
on it's own. Maybe a 3 out of 5 vote. Definitely not opposed, but not 
raving for it either. Is there some use of it that is not immediately 
apparent?


> If your answer is yes, I'll invite you to download the latest "pre-release"
> code from Subversion, test the new features and report any problems which we
> haven't discovered yet.
>    http://www.pmwiki.org/wiki/PmWiki/Subversion
Okay.


  ~ ~ David



More information about the pmwiki-users mailing list