On Tue, 8 May 2007, Patrick R. Michaud wrote:

  (:pagelist link={*$FullName} list=normal "[[!{*$Name}" :)

For which of the following cases will the above work:

* [[!SomeCategory]]
* [[!Some Category]]
* [[!Some category]]
* [[!Some (category)]]

Oops, you're right -- it only works for the first case. Sorry about that.

So, I'd go back to recommending

  (:pagelist link={*$FullName} list=normal "[[!" :)

Also, the solutions that Petko offered are excellent.  [1]

Hmm... I've tried those workarounds[1], but they really are workarounds.

Regarding the workarounds:
1) My pages in a category are often spread out over several groups.
2) This requires extra work, and you have to spell the keyword correctly
   (I've used this method, and I relatively often have typo problems)
3) Not sure what this means, unless it's simply embedding the search
   for the keyword inside a predefined list.

I think it should be possible to use separate methods depending on what you want to do, e.g. like this:

  Markup                Marks page as   Links to:       Prints as:
                        in category:
* [[!CatA]]             CatA            Category/CatA   CatA
* [[!Cat A]]            CatA            Category/CatA   Cat A
* (:category CatA:)     CatA            -               -
* {$Category}           -               -               CatA
* {$CategorySpaced}     -               -               Cat A

This would for instance allow the author to place the category instruction anywhere on the page, and let the group header print {$Category}. (See caveat below).

As for searching, I'd basically like:

* (:pagelist category=CatA :)

And then some method (we've discussed this earlier) to include/exclude other categories and/or searches.

The caveat: There is a simplification in the model above. A page can belong to several categories, so {$Category} is poorly defined. Maybe a directive with the ability to accept formatting parameters would be better (when the page belongs to multiple categories). Alternatively, if it's now possible to deal with variables that are arrays?

I don't know how/if this can be implented, but that's the kind of API I'd like.

/Christia

[1]  http://www.pmichaud.com/pipermail/pmwiki-users/2007-May/042793.html

--
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to