[pmwiki-users] pagelist template brainstorming

marc gmane at auxbuss.com
Sun Feb 18 15:35:05 CST 2007


Martin Fick said...
> --- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> 
> > > Additionally, in the template there may be a
> > section
> > >   
> > >   (:notfound:)
> > >   Sorry, no pages found for your query.
> >
> > We could do this within the proposed syntax with:
> > 
> >     (:first:)
> >     (:if equal {>$Group}:)
> >     Sorry, no pages found for your query.
> > 
> > or even
> > 
> >     (:last:)
> >     (:if equal {$$PageCount} 0:)
> >     Sorry, no pages found for your query.

I just wanted to wade in with some AOLs (it's the w/e), since I don't 
use pagelists a great deal...
 
> > I can see value in having a (:notfound:) shortcut
> > for this... but somehow I prefer to avoid adding
> > too many special-purpose directives here (in spite
> > of the fact that I've just proposed four
> > new ones :-).
> 
> Well, they greatly all add to readability I think
> without detracting from it.  The general use of the
> less readable (:if:)s can be left to advanced
> conditions.

+1

I really like Pm's newly suggested syntax, but I also prefer the 
(:notfound:) idea over the other options.

> I am excited by the idea of simplifying many of the
> default templates without sacrificing power with this,
> since templates have always been a little hard to
> "get"!

+1

Not using them much, it's always a tad painful to write one. It's a bit 
like having to use C++ (heaps and stacks, blurgh!) when you spend most 
of your time in Java and Ruby. (Caveat: I know Pm is a perl guy, so 
maybe this won't hold much water ;-) )

-- 
Cheers,
Marc




More information about the pmwiki-users mailing list