[pmwiki-users] Pagelists of multiple linkbacks
christian.ridderstrom at gmail.com
Fri Aug 15 06:38:39 CDT 2008
On Thu, 14 Aug 2008, Patrick R. Michaud wrote:
> On Mon, Aug 11, 2008 at 01:15:22AM +0200, noskule wrote:
>>> This is a planned feature but it doesn't exist yet. On
>>> http://www.pmwiki.org/wiki/PmWiki/RoadMap it's given as
>>> "Allow link= option to do wildcards".
I very recently came across a use case for this...
We use categories such as 'ToDo', 'ToDo-Christian', 'ToDo-Anders' to tag
pages that contain things that need to be done. Or maybe the entire page
is just a to do list. The point is that many pages have these tags.
The sidebar then contains the link [[!To do]], i.e. a link to the page
Category.ToDo, which of course lists all pages that contain the tag
'ToDo'. However, since we don't want to clutter sidebar with all the
links [[!ToDo-Christian]], [[!ToDo-Anders]], these category pages are
listed on the page Cateogry.ToDo. In other words, Category.ToDo contains:
(:pagelist group=Category name="Category.ToDo-*" :)
However, what we would also like to do is to add:
(:pagelist link="Category.ToDo-*" :)
since that would allow us to list all pages that in some sense need to be
Note that I actually tried the above, thinking it would work and was very
confused that it didn't... It wasn't until I read Patrick's post that I
realized the functionlity isn't implemented yet.
We currently use the workaround that any page that is tagged with
[[!ToDo-<x>]] must also be tagged with [[!ToDo]].
Writing the above, I realize that a better approach to tagging the pages
might be using page text variables. In other words, for each to be tagged,
add something like:
Then it's just a matter of searching for all pages that have the PTV
Maybe tags should really be a special case of PTV, or rather that tags and
categories should be implemented via PTV?
>>> However, I'm seriously considering Christian Ridderström's
>>> suggestion for being able to do set operations on pagelists:
>>> (:pagelist link=Category.Personal save=list1 :)
>>> (:pagelist link=Category.Professional save=list2 :)
>>> (:pagelist from=list1+list2 count=15 list=blog order=-ctime :)
>> hm, what would be the benefit/usecase of this method, compared to
>> wildcards? The only thing I see is that it isn't possible to exclude
> The biggest benefit is that this is easier to implement, plus it allows
> greater flexibility than simple wildcards in links. For example, it
> would be possible to say arbitrarily complex things like "all pages in
> category ABC that aren't on trail DEF" and the like.
As a concrete example, with the above functionality I could ask to find
all 'todo'-pages, except those tagged with e.g. 'Todo-Anders'.
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users