[pmwiki-users] pagelist pagination

The Editor editor at fast.st
Wed May 16 17:02:56 CDT 2007


On 5/16/07, Hans <design5 at softflow.co.uk> wrote:
> Wednesday, May 16, 2007, 10:07:58 PM, The Editor wrote:
>
> > $MarkupExpr['counter'] = 'MkExpExtCounter()';
> > function MkExpExtCounter() {
> >         global $ZAPcounter;
> >         $ZAPcounter = $ZAPcounter + 1;
> >         return $ZAPcounter;
> >         }
>
> I think this {(counter)} is not really any different than using
> {$$PageCount} in the pagelist template.
> And if I use (:pagelist ..... count=10..20 :) for instance,
> it will count 10, i.e. it will count up to the last displayed
> pagelink.
>
>
>  ~Hans

Maybe so. But then again I may not understand the problem. It could
easily be designed so that if it says {(counter)} it just checks the
current value and {(counter+)} increments it. That way you could put
one in the conditional and the other in the template, or some
combination. In which case I would only count pages that are actually
rendered, while blank pages would not trigger it. I presume that's the
problem with using $$pagecount in the first place.

Cheers,
Dan



More information about the pmwiki-users mailing list