[Zope] Newbie: TAL Conditions

Andreas Pakulat apaku at gmx.de
Tue Dec 7 09:47:52 EST 2004


On 07.Dec 2004 - 09:21:01, Tom_Rectenwald at carmax.com wrote:
> This works fine.  However, where there isn't a record (i.e. an empty 
> string), a <TD> will not be defined so that it leaves ugly gaps in the 
> table.  To ensure that a '<TD>&nbsp;</TD>' replaces an empty string '' I 
> added two tal:condition statements.  This works, but is sort of ugly 
> looking as, in my head, it is the equivalent of two 'if' statements when 
> it should be an 'if/else'.  The below code works, however is there a 
> cleaner way to do this?

AFAIK no, there is no "else" in tal:condition, but you should be able
to use SQL to add a "&nbsp;" wherever there is an empty string in that
column.

Andreas

-- 
Your reasoning powers are good, and you are a fairly good planner.


More information about the Zope mailing list