Categories > TinyButStrong general >

tbs_check

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Jorge
Date: 2004-01-30
Time: 12:09

tbs_check

I have somethink like:

<a href="[sys.script_name]?PageNum=[nv.last;endpoint;friend2=a]
&name=[var.name;noerr]
&id=[var.ch_id;noerr]
&book=[var.book;noerr]
">&gt;|</a>

If all values exist, of course it will print it,
but  i would like to print "&name=" only [var.name] exists

I've tryed with tbs_check:

[tbs_check;if [var.name]>' ';then '&name=[var.name]';else '']
or
[tbs_check;if [var.name]>0;then '&name=[var.name]';else '']

,but nothing works

Where am I wrong?
By: Skrol29
Date: 2004-01-30
Time: 14:33

Re: tbs_check

Hi Jorge,

The parameter 'if' supports only '=' and '!='.
But you can use the keyword [val], like this:
[var.name;if [val]='';then ''; else '&name=[val]']