Categories > TinyButStrong general >

Another conditional

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2004-02-21
Time: 11:34

Another conditional

I seem to be a bit confused right now :P

suppose I have a template:
<table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
   <td>
      <table width="100%" border="0" cellpadding="1" cellspacing="3">
      <tr>
         <td valign="top" colspan="2" class="wsheader">
            {lst.title_id;block=row;htmlconv=no;encaps=2}
         </td>
      </tr>
      <tr>
         <!-- QUESTION IS ABOUT THIS -->
         <td width="100" valign="top" nowrap class="wsback1">
            <a href="/data/article/images/{lst.image;htmlconv=no}">
               <img src="/data/article/images/thumbnails/{lst.image_thumb;htmlconv=no;friendb=img}"></a>
         </td>
         <!-- upto here -->
         <td width="90%" height="50" valign="top" class="wsback2">
            Omschrijving<br/>
            {lst.descr_id;htmlconv=wsp;.}
         </td>
      </tr>
      </table>
   </td>
</tr>
<tr class="wsback1">
   <td>Er is geen artikel gevonden.{lst;block=row;nodata}</td>
</tr>
</table>


and in the snippet from that code marked with the comments I want the image to be replaced by text 'click here for larger image' when the var lst.image_thumb is empty

for some reason I cannot get it done :S
Think I've been at it too long, approaching the problem from the wrong direction, anybody a new view for me?? ;)
By: RwD
Date: 2004-02-21
Time: 12:27

Re: Another conditional

WOULD ya look at THAT :D
Check my post about the bug I posted right after this thread :P

I found the answer in the code that showed in error!!!

answer:
<td width="100" valign="top" nowrap class="wsback1">
   {tbs_check.1;if '{lst.image_thumb}' != '';block=td}
   <img src="/data/article/images/thumbnails/{lst.image_thumb;htmlconv=no;friendb=img}">
</td>
<td width="100" valign="top" nowrap class="wsback1">
   {tbs_check.1;else;block=td}
   lalala
</td>