[pmwiki-users] Noobie Question: PmWiki 2.0 Categories

John Rankin john.rankin at affinity.co.nz
Wed Feb 23 21:11:48 CST 2005


On Thursday, 24 February 2005 1:33 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>After reading through John's excellent post, it occurs to me that what
>you really want is:
>
>    (:pagelist {$FullName}:)
>
>For any given category such as "Category.BreadAndPizza", this will
>find all pages that contain "Category.BreadAndPizza" *or* that link
>to Category.BreadAndPizza, through either the [[!BreadAndPizza]]
>markup or by doing something like [[Category/BreadAndPizza]].  This
>is because searches scan not only the markup text but also the names
>of any pages that the markup links to.  

Ah, I had forgotten that searches scan for page names as well as link 
text.
>
>This has the desirable features of not accidentally finding pages
>containing "bread", "and", "pizza", and you don't have to worry about
>$SpaceWikiWords settings because we're always looking at the target
>links.

But it will presumably find any (unlikely) references to 
Category.BreadAndPizza written in normal text, ie it doesn't
distinguish between [[Category.Bread]] and [[!Bread]].
>
>Of course, there's still a problem if we have both [[!Bread]] and
>[[!Bread and Pizza]] categories, in that doing a search for Category.Bread
>will also accidentally grab the "and Pizza" items as well.  This problem
>exists whether one uses (:pagelist {$FullName}:) or 
>(:pagelist '!{$Title}':), because the search function doesn't look
>for word boundaries at all -- it just does a simple substring
>match.

Could we do (:pagelist '!{$Title}]':) to get round this?


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list