[TYPO3-core] RFC: Fix bug #1391: Typo3 can't display a single "0" in a table cell

Michael Stucki michael at typo3.org
Tue Feb 28 01:56:12 CET 2006


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>&nbsp;</td> but
 <td>0&nbsp;</td> stays <td>0&nbsp;</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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_1391_v2.diff
Type: text/x-diff
Size: 1781 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060228/919ca83e/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060228/919ca83e/attachment.pgp 


More information about the TYPO3-team-core mailing list