[TYPO3-core] RFC: Fix bug #1391: Typo3 can't display a single "0" in a table cell
René Fritz
rene at typo3.org
Tue Feb 28 12:26:55 CET 2006
+1
René
> This is a CVS patch request. I've sent this patch some months ago but never
> finished it. So here is a new patch.
>
> Problem:
> In a text element containing a table a single "0" in a cell isn't rendered
> properly in the FE outbut but a "1" (for example) does:
>
> <td>0<td> becomes to <td> </td> but
> <td>0 </td> stays <td>0 </td> and
> <td>1</td> stays <td>1</td>
>
>
> Solution:
> Introduce new stdWrap property "ifBlank" and modify the table rendering TS
> accordingly.
>
> Background information:
> The "ifEmpty" stdWrap is unfortunately not doing what it claims to be: It
> doesn't check if a string is empty, instead it just tests if the value is
> true or not. (Therefore the TSref contains a notice that "Zero's are an
> empty value!")
>
> The solution is to add a new property which compares the value using
> strcmp('',$value).
>
>
> Documentation:
> ifBlank
> string / stdWrap
> Same as "ifEmpty" but the check is done using a binary comparison (strcmp).
>
> - michael
--
René Fritz
TYPO3 Association - Active Member
http://association.typo3.org/
More information about the TYPO3-team-core
mailing list