[pmwiki-users] Pagelist with alternate formatting per item

Simon nzskiwi at gmail.com
Thu Jun 10 05:07:56 CDT 2010


These are great.
I'm looking at solution 1 because I'd like to (initially) apply somehting
say through a wiki style,
but would be be correct in thinking it is not possible to supply a selector
in a wikistyle?

thanks very much

Simon


On 10 June 2010 21:32, Eemeli Aro <eemeli at gmail.com> wrote:

> On 10 June 2010 12:06, Simon <nzskiwi at gmail.com> wrote:
> > Of course there is not an "even" (or an "odd") conditional
> markup condition.
> > Has anyone some suggestions on how I could achieve this?
>
> 1. Use CSS3 rules such as li:n-th-child(even) and/or
> li:n-th-child(odd) [1]. Unfortunately, these don't work in IE [2].
>
> 2. Add the markup expression {(math)} [3], and then use the
> conditional (:if equal 1 {(math {$$PageCount} % 2)}:)
>
> 3. Add a custom conditional:
>    $Conditions['odd'] = 'intval($condparm) % 2';
> and then use it: (:if odd {$$PageCount}:)
>
> > PS what do you think about have an extension to pagelist for conditions,
> eg
> > (:template if <markup expression> :)
>
> Is there a use case where the same result can't be achieved with
> already existing markup?
>
> eemeli
>
> [1] http://www.w3.org/TR/css3-selectors/#nth-child-pseudo
> [2] http://www.quirksmode.org/css/contents.html
> [3] http://pmwiki.org/wiki/Cookbook/MarkupExpressionSamples#math
>



-- 
____
http://kiwiwiki.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100610/bc36bd77/attachment.html>


More information about the pmwiki-users mailing list