Categories > TinyButStrong general >

Removing a section based on a boolean value

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Michael Frey
Date: 2011-12-16
Time: 14:13

Removing a section based on a boolean value

Hi,

I can not figure out how to achieve this:

I have a (global) php variable. When this variable is set to true i want to remove a div section which contains an image. If it is false nothing should happen. How can i do this?

Thanks a lot
Michael
By: Skrol29
Date: 2011-12-16
Time: 21:35

Re: Removing a section based on a boolean value


In the template, all values are inserted as text. The PHP conversion makes value TRUE becoming "1", and FALSE becoming "".
So you can use a conditional block like this one :

[onload;block=div;when [var.my_variable]='']