[Zope] simple question...more problems
Donald Braman
donald.braman@yale.edu
Mon, 19 Feb 2001 22:15:39 -0500
With Tim's advice, I can get it to work for a single if expression, I can't
get it to work for more than one...and I need NINE! Any idea what I can do?
Here's the code again (I didn't change it to nice generic names this time).
<!--#in rankingquery-->
<tr>
<td>Score</td>
<td><!--#var citation--><!--#var year--></td>
<td><!--#var casenameshort--></td>
<td><!--#if expr="currie=='t'"-->Currie<!--#/if></td>
<td><!--#if expr="farber=='t'"-->Farber<!--#/if></td>
<td><!--#if expr="fisher=='t'"-->Fisher<!--#/if></td>
<td><!--#if expr="gunther=='t'"-->Gunther<!--#/if></td>
<td><!--#if expr="landmark=='t'"-->Landmark<!--#/if></td>
<td><!--#if expr="lockhart=='t'"-->Lockhart<!--#/if></td>
<td><!--#if expr="oxford=='t'"-->Oxford<!--#/if></td>
<td><!--#if expr="schwartz=='t'"-->Schwartz<!--#/if></td>
<td><!--#if expr="stone=='t'"-->Stone<!--#/if></td>
</tr>
<!--#/in-->
And the error I get this time is:
unexpected end tag, for tag <!--#/if></td> <td><!--#if
expr="fisher=='t'"-->, on line 83 of index_html
Traceback (innermost last):
File /usr/local/zope/230/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
File /usr/local/zope/230/lib/python/ZPublisher/Publish.py, line 187, in
publish
File /usr/local/zope/230/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: index_html)
File /usr/local/zope/230/lib/python/ZPublisher/Publish.py, line 171, in
publish
File /usr/local/zope/230/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: manage_edit)
File /usr/local/zope/230/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: manage_edit)
File /usr/local/zope/230/lib/python/OFS/DTMLDocument.py, line 144, in
manage_edit
(Object: index_html)
File /usr/local/zope/230/lib/python/DocumentTemplate/DT_String.py, line
388, in munge
(Object: index_html)
File /usr/local/zope/230/lib/python/DocumentTemplate/DT_String.py, line
408, in cook
(Object: index_html)
File /usr/local/zope/230/lib/python/DocumentTemplate/DT_String.py, line
242, in parse
(Object: index_html)
File /usr/local/zope/230/lib/python/DocumentTemplate/DT_String.py, line
281, in parse_block
(Object: index_html)
File /usr/local/zope/230/lib/python/DocumentTemplate/DT_String.py, line
131, in parse_error
(Object: index_html)
Document Template Parse Error: (see above)
Any help appreciated. -Don
-----Original Message-----
From: tim@mr1.its.yale.edu [mailto:tim@mr1.its.yale.edu]On Behalf Of Tim
Cook
Sent: Monday, February 19, 2001 9:38 PM
To: donald.braman@yale.edu
Cc: zope@zope.org
Subject: Re: [Zope] simple question about <!--#if expr="fieldname =
't'"-->
Donald Braman wrote:
> I'm having trouble making a simple text comparison (my very first in
Zope).
> <td><!--#if expr="fieldname = 't'"-->yes<!--else-->no<!--#/if></td>
> (Object: fieldname = 't')
> SyntaxError: (see above)
>
I think it's because you used the assignment operator '=' instead
of the comparison operator '=='.
--
Tim Cook, President - FreePM,Inc.
http://www.FreePM.com Office: (901) 884-4126
New MedicationManager, Try it now at:
http://www.freepm.org:8080/FreePM