Portlet Factory, Version 6.1.2


 

Alternating styles (and classes) for table rows

Often, in creating an HTML table, you want to have alternating styles for the rows to make the table easier to read. You can build this functionality into an HTML template. On any XML node for which an alternating attribute is desired, simply prefix the attribute name with sequence_ (with the underscore) and list the different values for the attribute in a comma-separated list.

For example, in a <TR> tag, to alternate between the HTML class names TableRowOdd and TableRowEven, add the following:

<tr sequence_class="TableRowOdd,TableRowEven">
...
</tr>

This technique has the identical effect as adding an attribute sequencer on the node, selecting the class attribute, and supplying those values for the sequence. You can apply the sequence_ prefix to any attribute, so you could define the style directly. For example:

<div sequence_style="background-color:white,background-color:cyan">
...
</div>

Parent topic: Page Automation HTML templates


Library | Support |