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

Mike Shanley up at upisup.com
Fri Sep 7 12:56:47 CDT 2007


Hey all!

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.

I'm trying to use pagelists to build a table that has two sets of data 
per row... Something like this:

[[#albums]]
(:template defaults order=-$:completed $:completed=- list=normal 
group=Works:)
(:template first:)
    (:table style="border=0;":)
(:template each:)
    (:if ODD??? {$$PageCount}:)
        (:cellnr style="font-size:80%;":)
    (:else:)
        (:cell style="font-size:80%;":)
    (:ifend:)
            [[{=$FullName}|(:thumb {=$FullName}/{=$Name}.gif link=-1:)]]\\
            [[{=$FullName}|{=$Titlespaced}]]
        (:cell style="text-align:left;":)
            {=$:description}
            ----
            {=$:style}
            ----
            {=$:completed}
(:template last:)
    (:tableend:)
[[#albumsend]]

Thanks!
-Mike



More information about the pmwiki-users mailing list