Categories > TinyButStrong general >

If variable is true; don't show

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Col
Date: 2005-02-14
Time: 06:21

If variable is true; don't show

Hi Skrol,

I'm sure there's a simple solution for this. I'm using a variable to control whether a table is shown or not. If the variable is true I want to show the table but not the variable. Currently this is what I have:
<table>
  [var.display_table;magnet=table;noerr]
  // if display_table is true then display table (obviously :)
</table>

Thanks again for your time.
By: Skrol29
Date: 2005-02-14
Time: 10:12

Re: If variable is true; don't show

set $display_table to empty string ('') if you whant the table to be deleted, and set $display_table to space (' ') if you whant the table to be shown.
You don't need 'noerr'.
By: Col
Date: 2005-02-14
Time: 22:26

Re: If variable is true; don't show

I tried that but the table is then pushed across by that space.
By: Col
Date: 2005-02-14
Time: 22:31

Re: If variable is true; don't show

I have seperate tables lined up above other tables so it's obvious if they don't line up. Maybe the solution is to move the permanent tables across by one space.
By: Skrol29
Date: 2005-02-15
Time: 18:53

Re: If variable is true; don't show

Sorry, I don't figure out  what you mean. Did you use embeded tables?
By: Col
Date: 2005-02-15
Time: 22:23

Re: If variable is true; don't show

Sorry, my mistake - it does work perfectly. Problem was in my html code.
Thanks again.