[pmwiki-users] pagelist pagination

The Editor editor at fast.st
Wed May 16 14:59:13 CDT 2007


On 5/16/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Wed, May 16, 2007 at 03:17:37PM -0400, The Editor wrote:
> >
> > But you could put a markup expression in the template that serves as a
> > counter. It saves the value to a global and then retrieves it each
> > time it iterates through the template then resaves the new value and
> > returns it both.  This would allow it to be displayed in the pagelist
> > template in a conditional for example.
> >
> > To be a bit fancier you could also do the same thing for page number
> > (as page 1 = 1-50, page 2 = 51-100). I'm kind of occupied right at the
> > moment, but it seems an easy way to do what you are talking about.
>
> Well, it can't be a standard "markup expression" as in {(...)}, because
> those are evaluated before any (:if:) directives.  The same goes
> for standard page variables.  It has to be a specialized form of
> markup.

Actually that's exactly what I was thinking. The first time the
template passes over {(counter)} for example, it returns 1. The next
time it returns 2. etc. Then in a conditional you just do if
{(counter)} < 50...

> And I'm not merely looking for "Will it work?"; I'm also looking
> for "Is it relatively straightforward to understand and explain
> what is happening?"

That seems pretty straightforward to me... And very simple to do...

Cheers
Dan



More information about the pmwiki-users mailing list