Categories > TinyButStrong general >

Problem with if and else

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: leeladharan
Date: 2005-04-19
Time: 09:48

Problem with if and else

I have tbs vars for filemimeType and file name,How to have this logic in HTML page using tbs conditionals?

if (filemimeType == 'image/jpg')
   {
          echo "<img src = "filename" width = 100 height = 100>";
    }
else
    {
           echo "filename"
     }
By: Skrol29
Date: 2005-04-19
Time: 10:43

Re: Problem with if and else

This should work:
<img src="[var.filename;if [var.filemimeType]!='image/jpg';then '';else [val];magnet=img;mtype=m*]" width="100" height="100">
[var.filename;if [var.filemimeType]='image/jpg';then '';else [val]]