[pmwiki-users] pagelist template brainstorming

Patrick R. Michaud pmichaud at pobox.com
Mon Feb 19 10:56:13 CST 2007


On Mon, Feb 19, 2007 at 05:37:16PM +0100, Skrol29 wrote:
> Hi,
> 
> I don't like the (:first:)(:each:)(:last:).
> It will be so unwelcome when pmWiki will support loops for other purpose.

I don't quite understand why this would be a problem when
PmWiki supports loops for other purposes?  

> I think (:pagelist_first:) ... is better than (:pagelist-first:).
> Because "_" is never ambiguous, while "-" can looks like an operator or a
> prefix for a parameter.

This is reasonable, but I really dislike underscores.  (Sorry, it's
just a quirk of mine.)  I'd probably go for (:pagelistfirst:) 
before (:pagelist_first:).

Also, there's lots of precedent in the Cookbook for using hyphens 
in directive names, but I can't find many examples of using underscores.  
Examples using hyphens:

    (:calc-avail:)            CalculateAvailability
    (:map-end:)               GoogleMapsInterface
    (:marklet-delete:)        Marklets
    (:marklet-dup:)           Marklets
    (:toc-back:)              PageTableOfContents
    (:toc-page:)              PageTableOfContents
    (:rating-*:)              Rating
    (:useful-*:)              Rating

Another possibility for first/each/last:

    (:firstpage:)   (:eachpage:)   (:lastpage:)
    (:firstpage {=$Group}:)   (:lastpage {=$Group}:)

> Does it make sens do have a syntax like this:
> (:pagelist ope=first:) ?

No, because (:pagelist ...:) should generate a pagelist
(even if it appears in a template).

> I hope my comments can be useful,

They are useful, and thanks!

Pm



More information about the pmwiki-users mailing list