[pmwiki-users] PageListTemplates, Conditionals, and Odds and Even...

Eemeli Aro eemeli at gmail.com
Fri Sep 7 23:26:36 CDT 2007


On 9/7/07, Mike Shanley <up at upisup.com> wrote:
> I've tried a few different methods and searched aplenty, but can't seem
> to find any information on how to determine if {$$PageCount} is odd or even.

Don't know if there's a better way, but at least this sould work: add
these two lines to your config.php:

function IsOdd($x) { return $x % 2; }
$Conditions['odd'] = 'IsOdd($condparm)';

And then you can use "(:if odd {$$PageCount}:)".

eemeli



More information about the pmwiki-users mailing list