Categories > TinyButStrong general >

display serial table only if not empty

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Peter Schade
Date: 2005-09-12
Time: 15:59

display serial table only if not empty

Hello!

I wan't to display the table ony if the data is not empty.

Here is my code


<table width="80%" border="0" align="center" cellpadding="2" cellspacing="0">
  <tr bgcolor="#FFCC66">
    <td colspan="3"><div align="center">Bilder</div></td>
  </tr>
  <tr bgcolor="#FFEECA">
    <td align="center"><a href="[bx_1.url]" target="_blank"><img src="[bx_1.murl]" border="0"></a><br>
        [bx_1.title;block=td]</td>
    <td align="center"><a href="[bx_2.url]" target="_blank"><img src="[bx_2.murl]" border="0"></a><br>
        [bx_2.title;block=td;.]</td>
    <td align="center"><a href="[bx_3.url]" target="_blank"><img src="[bx_3.murl]" border="0"></a><br>
        [bx_3.title;block=td;.][bx;block=tr;serial]</td>
  </tr>
  <tr bgcolor="#FFEECA">
    <td>[bx_0;block=td][bx;block=tr;serial]&nbsp;</td>
  </tr> 
</table>


onshow and magnet can i not use because the html file ist written to disk and not displayed per Show()

Is there an easier way of doing
$TBS->GetBlockSource("wholehtml");
wholehtml is an block around all html

Bye Peter
By: Skrol29
Date: 2005-09-12
Time: 21:27

Re: display serial table only if not empty

Hello Peter,

>onshow and magnet can i not use because the
> html file ist written to disk and not displayed per Show()

You can force the onshow and var fields merging using the MergeSpecial() method.
You can also use the Show() method with property Render in order to not echo nor exit the script at the end.