WebMake Documentation (version 2.4)




  <use plugin="csvtable_tag" />


  <csvtable [delimiter="char"] [HTML table attributes]>


This WebMake Perl library provides a tag to allow HTML tables to be constructed, quickly, using a tab-, comma-, or pipe-separated value table.

Firstly, pick a delimiter character, such as |. Set the delimiter attribute to this character.

Each line of the CSV table will become a <TR>; each delimiter-separated cell will be enclosed in a <TD> tag pair.

Attributes for the HTML table tag itself, can be provided as attributes to this tag; they will be passed through into the resulting <TABLE> tag.

By default, items inside the tables are represented as <TD> cells, with no attributes. Certain special line prefixes allow control over formatting of table items, as follows. These are all case-insensitive, and whitespace after them will be stripped; but they must start on the first character of the line (no leading spaces), and, despite how they're rendered here, should not contain any spaces between the angle brackets.

Blank lines are skipped.

<!-- .... -->
Comments, a la HTML.
The rest of the line is used to specify the format to be used for each line afterwards, until the end of the <csvtable>, or until the next <csvfmt> line.

The line should end in a </csvfmt> closing tag.

Specify a <tr>...<tr> block, with $1, $2, $3, etc. for the numbered cells (counting from 1). For example:



  <csvtable delimiter="|">
  <!-- heading --E<gt>
  First Name|Surname|Title
  <!-- contents --E<gt>


Thanks to Chris Barrett; he suggested this tag.

WebMake Documentation (version 2.4)
Built With WebMake