[Zope] Need some newbie tal help
Mark Phillips
mark at phillipsmarketing.biz
Tue Oct 5 13:20:19 EDT 2010
I have a table and I am putting data into the cells using tal. I want to
bold the data under a certain condition. I tried this, but it didn't work:
<td tal:content="string:${player/name}"><b
tal:condition="python:str(player['name']) == 'Team'">name</b></td>
The data (player/name) appears correctly, but when player/name='Team', the
text is not bold. After some reading, I believe what is happening is that
the tal:content tag is replacing everything between the <td> and the </td>
tags. Is this correct? I tried this, and no bold either:
<td tal:content="string:${player/GP}"><b>GP</b></td>
which supports my hypothesis about the tal:content tag.
How do I add some "conditional bold effect" in my table data?
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20101005/eb9604a8/attachment.html
More information about the Zope
mailing list