TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

Conditional disply of blocks now working

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: BNS
Date: 2013-07-23
Time: 11:37

Conditional disply of blocks now working

I have this code

<div>
  <!--[onshow;block=div;when [var.show] == 'notification';comm]-->
</div>

this is not working, but the one below works

<div>
  <!--[onshow;block=div;when [var.show] == 1;comm]-->
</div>

any ideas why its working only if the var is numerical

By: Skrol29
Date: 2013-07-23
Time: 16:49

Re: Conditional disply of blocks now working

Hi,

Replace
[onshow;block=div;when [var.show] == 'notification';comm]
[onshow;block=div;when 'notification' == [var.show];comm]

The problem comes from TBS that has difficulties to evaluate
  [var.show] == 'notification'
when [var.show] contains delimiters such as (')