Oliver Betz writes:
repeating certain elements every N entries of a page list would be
nice e.g. for table headers.
Ist there a simple way to get this?
Yes, enable the "modulo" MarkupExpression, in config.php:
# from Cookbook:MarkupExprPlus by DFaure
$MarkupExpr['mod'] = 'mod' => '0 + ($args[0] % $args[1])';
Then, in the pagelist template (:template each:) section, for example for
every 12 pages, use this:
(:if equal "{(mod {$$PageCount} 12)}" "0":)
Repeat header here after 12 lines
(:if:)
Note, if you repeat the same header, it may be better to use
(:if equal "{(mod {$$PageCount} 12)}" "1":)
which will also write the first header.
Petko
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users