[pmwiki-users] Excluding results from earlier (:pagelist:)

Patrick R. Michaud pmichaud at pobox.com
Thu Mar 1 17:35:18 CST 2007


On Thu, Mar 01, 2007 at 04:36:49AM +0100, christian.ridderstrom at gmail.com wrote:
> I just had a thought... sometimes I want to create more than one list of 
> pages on a page. And when I create the second (and third) list, I don't 
> want the pages in the previous lists to appear.
> 
> What if (:pagelist:) kept track of it's list of pages in an array, and it 
> was possible to refer to it later, saying that "I want the current 
> pagelist to exclude any pages that occured in the previous list".
> 
> Actually, if you extend this so that (:pagelist:) does the search but 
> never shows the list, you could imagine something like this:
> 
> 	(:pagelist bloopsi  fmt=#hidden:)
> 	(:pagelist whoopsi  fmt=#hidden:)
> 	# Show pages from first result, but not occuring in second result
> 	(:pagelist previous-results=+1,-2 :)

How about something like:

    (:pagelist bloopsi fmt=none save=abc :)
    (:pagelist whoopsi fmt=none save=def :)

    (:pagelist list=abc,-def:)

So, the first command finds pages containing 'bloopsi', saves that
as 'abc'; the second command finds pages containing 'whoopsi', saves
that as 'def', and the last command displays all of the pages in abc
that aren't in def.

Of course, shorter would be:

    (:pagelist whoopsi fmt=none save=def :)
    (:pagelist bloopsi list=-def :)

This has some possibilities (and doesn't seem too outrageous
to implement) -- I'll think on it a while.

Pm



More information about the pmwiki-users mailing list