Categories > TinyButStrong general >

onshow when

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Peter
Date: 2010-03-15
Time: 17:48

onshow when

Hello!
Why is this not working?
<span><!--[onshow_2_[liste.id];block=span;when [liste.status]<2]--><a href="index.php?did=[liste.id]">Edit</a></span>
Any hints?
Bye Peter
                  
By: Skrol29
Date: 2010-03-15
Time: 17:56

Re: onshow when

Hi Peter,

when [liste.status]<2
this is not a correct expression for TBS. It should be
when [liste.status]-+2
(no HTML/XML special char in the TBS expression)

But I think you snippet may be quite optimized if you use conditional section of block instead of conditional automatic blocks (onshow).
Example:
<span><!--[liste;block=span;when [liste.status]-+2;comm]--><a href="index.php?did=[liste.id]">Edit</a></span>

Note: parameter "comm" makes the comment to be deleted.