[Zope] dtml-if question - please help!

Ted Pollari tcp at mac.com
Mon Oct 6 12:30:47 EDT 2003


On 10/6/03 10:37 AM, "A. B. Monta" <apbmonta at yahoo.com> wrote:

> 
> The following dtml raises the following error message:
> "unexpected end tag for dtml-if":
> 
> <dtml-if hotel_rate1>
> <tr>
> <th align="right">Hotel Allowance A</th>
> <td align="right"><dtml-var hotel_rate1></td>
> <td align="right">x <dtml-var hotel_rate1_days></td>
> <td align="center">=</td>
> <td align="right">
> <dtml-let subtotal_hotel_rate1="_.float(hotel_rate1)
> * _.int(hotel_rate1_days)">
> <dtml-var subtotal_hotel_rate1
> fmt="dollars-and-cents"></td>
> <td>&nbsp;</td>
> </tr>
> </dtml-if>
> 
> Without the initial conditional, everything works
> fine.  Is there some conflict between the conditional
> and the manipulation of the namespace with dtml-let?
> 
> Cheers,
> Anthony


I believe the problem is that you're missing a closing tag for your
<dtml-let> tag.  The closing tag is implied if you just use the code as-is,
without an enclosing <dtml-if> tag, but when you add the conditional, you're
breaking the nested structure by not supplying a closing tag for the
dtml-let block before you close the dtml-if conditional block.

Hope that helps,

Ted




More information about the Zope mailing list