[support] trying to create zebra striping in custom block
neil at esl-lounge.com
neil at esl-lounge.com
Wed Jun 16 14:59:15 UTC 2010
haha, thought this question had died, then it bursts into life few days
later. I'll try these suggestions today and see if they work.
thanks everyone.
just out of interest, does the $zebra variable not work anymore in D6? Why
would my original code not work?
sorry, I'm always one for not only finding out the solution, but also why
a supposed alternative doesn't work.
Neil
Pierre Rineau wrote:
> Le mercredi 16 juin 2010 à 17:46 +0300, Fred Jones a écrit :
>> > Or the condensed version:
>> >
>> > print "<tr class=\"" . (($oddeven++ % 2) ? "odd" : "even") .
>> "\"><td>";
>>
>> I am humbled.
>>
>> > I like obfuscation, this is the story of my life.
>>
>> Code obfuscation? +1 for job security. :)
>>
>> LOL
>
> Ahah :)
>
> I could have wrote:
>
> list($would,
> $beer,
> $I,
> $love,
> $some) = array(
> (bool) (((((int)$oddeven)++) % 2) == 0), "\"><td>"
> "<tr class=\"", "odd", "even"
> );
>
> // WTF!
> print $I . ($would ? $love : $some) . $beer;
>
> // Tell me if that works please :)
>
> Pierre.
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
More information about the support
mailing list