Tuesday 05 July 2005 3:40:54 am
Strangely enough, <tr> doesn't support a classification in eZ publish XML. I've got no idea why and at first I tried to hack the kernel to get those alternative row colors. But this proved to be more difficult than expected and there was a much easier way:
{let classification=""}
{section show=$row_count|ne(0)}
{section show=$row_count|mod(2)|eq(1)}
{set classification="bgdark"}
{section-else}
{set classification="bglight"}
{/section}
{/section}
<tr {section show=ne($classification,'')} class="{$classification}"{/section}>
{$content}
</tr>
{/let}
On the negative side, you don't have control over the shading. On the plus side, it happens all automatically and the XML code is much shorter (which is a gain especially for long tables).
Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at
|