[pmwiki-users] pagelist extension - experimental

Petko Yotov 5ko at 5ko.fr
Tue Mar 17 18:11:27 CDT 2009


On Tuesday 17 March 2009 15:41:39 Sameer Kumar wrote:
> > I placed  in the pages keywords instead of categories, like
> >  Categories: _contacts _france _family
> >
> > and in the pagelist I did fulltext search for these keywords :
> >
> >  (:pagelist _contacts _france _family:)  only family in France
> >  (:pagelist _contacts -_france _family:) only family NOT in France
...
> Except that full text search may find other pages that have the words in
> them but should not be included in the pagelist.

This is why I am using "_" (underscore) before the keyword or the category. I 
can have _Contractors, _China, _Roofing, _Consultants. I will not use 
_Contractors in a page where there are no contractors (I can 
use "Contractors" but not "_Contractors").

Then, the fulltext search can find exactly what I want. (Should I really need 
to use _Contractors not as a category keyword, I can use something else for 
the keyword, say "_Contractors_" or "__Contractors".)


> Would the planned feature of allowing link=cat1,cat2, cat3 allow me to
> accomplish what I am looking for? As shown above I want to be able to find
> pages that have all cat1 AND cat2 AND cat3 simultaneously, not either one

We'll have to make it possible. (Similar markup for page names and groups 
though displays either one.)

> of them. If this is currently possible through some other means, I am eager
> to know.

If you don't mind using a different markup, you can add [[_Category]] as a 
synonyme of [[!Category]] :

  Markup('[[_','<[[','/\\[\\[_(.*?)\\]\\]/e',
    "Keep(MakeLink(\$pagename,PSS('$CategoryGroup/$1'),NULL,'',
    \$GLOBALS['LinkCategoryFmt']),'L')");

In that case, adding [[_Contractors]] in a page will place the page in 
the Category.Contractors. Also, a fulltext search pagelist will find 
the "_Contractors" keyword:

  !! All Roofing consultants in China 
  (:pagelist _Roofing _Consultants _China:)     note: no link=

The "_" character is interesting because it is not separated from the keyword 
in the page index.

Thanks,
Petko



More information about the pmwiki-users mailing list