Hi Roy,
There is some text on if/then/else on the Support page of this Forum,
under the Golden Rules:
'If/then/else' are to be used for TBS fields.
The example there says:
[var.x;if [var.x]=1;then 'one'] |
This means, that when this TBS field is merged, TBS will replace this TBS field in the
template by the value of the PHP variable $x for each record --- except when the
value of the variable is number 1, then it will replace it with the string 'one'.
In your case, you will have to know when the last record is to be merged, for example by having a variable set. Then test that variable like var.x here.
I have an <ul><li>-list - (Thank you Olivier, for your tabbed navbar tip on Tips&Tricks!)
<ul class="navlist">
<li class="borderline"><a class="[btab.0;if [val]='k';then 'current']" href="[btab.2;block=li]">[btab.1]</a></li>
</ul> |
Here I use as the class of <a href> the value of key 0 in my array btab. These are normally 's', 'n','k'... and the html code will be
or "n" etc.
but when the value is 'k' then it is
<a class="current" href=...> |
I hope this helps.