[Zope] Simple DTML question
John Ziniti
jziniti at speakeasy.org
Fri Aug 27 16:13:15 EDT 2004
Coming late on this thread, hope I'm not OT, or
ignorant of the OP's problem ...
hpinson at indepthl.com wrote:
> <table>
> <dtml-in SQL_getNames>
> <dtml-if sequence-start>
> <tr align="left" valign="top">
> </dtml-if>
> <td height="28" bgcolor="white">
> <dtml-var last_name>, <dtml-var first_name>
> <dtml-var middle_name null="">
> </td>
> <dtml-if sequence-end>
> </tr>
> </dtml-if>
> <dtml-else>
> <p>No records are returned.</p></dtml-if>
> </tr>
> </dtml-in>
> </table>
The dtml-else clause you are using here should be part
of the dtml-in. You want:
<table>
<dtml-in SQL_getNames>
<dtml-if sequence-start>
<tr align="left" valign="top">
</dtml-if>
<td height="28" bgcolor="white">
<dtml-var last_name>, <dtml-var first_name>
<dtml-var middle_name null="">
</td>
<dtml-if sequence-end>
</tr>
</dtml-if>
<dtml-else>
<tr align="left" valign="top">
<td><p>No records are returned.</p></td>
</tr>
</dtml-in>
</table>
...or just:
<table>
<tr align="left" valign="top">
<dtml-in SQL_getNames>
<td height="28" bgcolor="white">
<dtml-var last_name>, <dtml-var first_name>
<dtml-var middle_name null="">
</td>
<dtml-else>
<td><p>No records are returned.</p></td>
</dtml-in>
</tr>
</table>
HTH,
JZ
More information about the Zope
mailing list