[pmwiki-users] Divisible - was: PageListVariables
Martin Fick
mogulguy at yahoo.com
Thu Jun 8 14:30:02 CDT 2006
> > Also there was a 'divisible' conditional
> > to test whether a number is divisible by another
> > number (I know, a little weird, but very usefull).
>
> > [...] Are these features that you
> > deliberately left out or were you unaware of them
> > Patrick?
>
> I left them out deliberately, not because I thought
> they weren't
> useful, but because it seemed too "special-case" to
> commit to
> the core just yet. (I wanted to see if I could
> think of
> a more generic conditional beyond just "divisible".
> Actually,
> I now that I think about it, there probably is one,
> but I'll
> want to build a test example before I try to explain
> it. :-)
The reason I chose divisible is because I was
attempting to not introduce all-out math into
conditionals. Divisbile is obviously useful to create
a form of cycling, say wrapping a table after every
third column (:if divisible {$PageCount} 3:). It was
a good start, but there were still simple formatting
things that were not possible: using the same
scenario, wrapping every third column, what if you
wanted to set a different color to the middle column?
You would probably need some form of generic math
framework, probably more than what you want in pmwiki.
I just figured I'd mention this type of limitation to
divisible now since you are potentially thinking of a
more generic solution. :)
-Martin
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the pmwiki-users
mailing list