Hi,
[var] fields are merged at the end, during the Show() method. That's why your field is not valid when you call MergeBlock('news',...).
In TBS 3.2.0 (available soon), you will have [onload._GET.lang] which enables you to define a var field which is merged as soon as the template is loaded.
But for now, you have to merge manually this field before you call MergeBlock('news',...). You can do :
But it will merge all [var] field. It may be good or not for your template.
If it's not, replace [var._GET.lang] by [prepare._GET.lang] and do:
$TBS->MergeField('prepare',$GLOBALS);
|