TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

Conditional display - empty/null variable evaluation

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

By: Anonymous
Date: 2013-09-02
Time: 15:01

Conditional display - empty/null variable evaluation

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

This does not seem to be working.

Can TBS evaluate empty/null variables
By: Skrol29
Date: 2013-09-03
Time: 00:09

Re: Conditional display - empty/null variable evaluation

Hi,

> Can TBS evaluate empty/null variables

Yes.

What is the value that does not work. Can you provide a snippet of the PHP part?
By: Sheepy
Date: 2013-09-03
Time: 08:13

Re: Conditional display - empty/null variable evaluation

Not sure whether this ocde snippet helps.  If not please explain what you want to do and where you are stuck.

<div>
   This part is shown when $show is not empty
   <!-- [onshow.show; magnet=div; noerr] -->
</div>
<div>
   This part is shown when $show is empty
   <!-- [onshow.show; ope=mok:; magnet=div; noerr] -->
</div>