Go to the first, previous, next, last section, table of contents.


Record list part

In many templates there are template parts (see the introduction at the beginning of this chapter) used to display a list of records from the database. All of them (with the notable exception of the query by example search result, See section sqledit_search.html.) use the same library and comply to the following part description for their display.

`Params and Parts'
If there is a style parameter in the enclosing part and that the value associated with this parameter is table, then the part used to display the search results will be row. Otherwise the part used will be entry.
`style = table'
Use row part. The columns parameter is the number of columns generated. For each record, the entry part is repeated. If the entry part has been repeated columns times, the row part is displayed with the generated entries.
...
<table>
<!-- params 'style' => 'table', 'columns' => 2 -->
<!-- start row --> 
<tr>
<!-- start entry -->
<td> <a href='_URL_'>_NAME_</a> (_COUNT_) </td>
<!-- end entry -->
</tr>
<!-- end row --> 
</table>
...
`style = *'
Use entry part, repeated as many times as there are records.
...
<ul>
<!-- start entry -->
<li> <a href='_URL_'>_NAME_</a> (_COUNT_)
<!-- end entry -->
</ul>
...
If no records are found, the row or entry parts are not displayed. In some cases, the entry part (within a row part or stand alone) may be subdivided as shown below:
...
<ul>
<!-- start entry -->

<!-- start company -->
<li> _COMPANY-NAME_ _COMPANY_URL_
<!-- end company -->

<!-- start customer -->
<li> _CUSTOMER-NAME_ _CUSTOMER-ACTIVITY_
<!-- end customer -->

<!-- end entry -->
</ul>
...
This subdivision is always an alternative, that is, either the company part or the customer part will be displayed, never both. This is mainly used to specify a part that many contain records from different tables so that they are displayed in a specific way. The exact semantic associated with these subparts is defined by the cgi-bin.
`Tags'
Within the entry part, the following tags are defined.
`table tags'
All the automatically generated tags for the database table are available, provided that _DEFAULTROW_ was not found in the template, See section Database table tags.


Go to the first, previous, next, last section, table of contents.