By: Rob
Date: 2003-10-24
Time: 09:14
|
Value in <a href> won't display
I show a gif when it exists. With a <a href> I want the user to be able to load another file, however no value is returned but the code for TBS is. The data is coming from MySQL.
This is part of my html-file:
<td width="17">
[blk1.pers_index;if '[val]'!=0;then '<a href="tpl_pers_spec.php?nr=[blk1.pers_index]"><img src=[blk2.dir_plaatjes]krant_12x15.gif alt="Wat zegt de pers" border="1" align="right" vspace="0" hspace="0"></a>';htmlconv=no]
</td>
|
The value of blk1.pers_index does exist. The picture is shown.
However, tpl_pers_spec.php?nr=[blk1.pers_index] is shown as result instead of for instance tpl_pers_spec.php?nr=134
Any idea? Thanks very much
|
By: Rob
Date: 2003-10-24
Time: 10:01
|
Re: Value in <a href> won't display
I found part of the solution with <friend>. However, as the data is coming from an index field, there will always be a value. Most of the time this is 0 and the picture and <a href> should not be displayed.
This is the code I use now:
<td width="17">
<a href=tpl_pers_spec.php?nr=[blk1.pers_index;friend=a href]><img src=[blk2.dir_plaatjes]krant_12x15.gif alt="Wat zegt de pers" border="1" align="right" vspace="0" hspace="0"></a>
</td>
|
But in most cases 0 is returned.
How can I change the value of 0 to '' (i.e. nothing) so the Friend parameter can be used correctly?
Thanks again.
|
By: Skrol29
Date: 2003-10-24
Time: 18:13
|
Re: Value in <a href> won't display
Hi Rob,
Some one had the same problem in a previous post.
TBS fields don"t support self-including.
They support other included TBS tags but not self-including.
That was to avoid infinit loops.
I agree this is anoying, and I'll work on it.
|
By: Rob
Date: 2003-10-27
Time: 09:12
|
Re: Value in <a href> won't display
Hi Skrol29,
I came across that message and changed my script in the 2nd message. But I still have a problem that might be outside of TBS:
In a MySQL indexfile a number is filled in automatically. If there is a picture, there is a positive (increasing) value. Is there no picture than the value is 0 (zero).
The Friend-function in TBS cannot check on values but does check if a value or text exists. If there is no value the according tags are removed.
Now what I want is to change the 0-value to a none-value (''). How can I do this?
Thanks very much.
Rob
|
|
Posting in progress.
Please wait...
|