Categories > TinyButStrong general >

String comparison

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Preben Holm
Date: 2006-08-17
Time: 11:44

String comparison

Hi,

In PHP I've set this variable:
  $lang = "da";

Why does this not work when comparing this string in TBS template:
  [onload; if [var.lang] == "da"; then '[product.description_da]'; if [var.lang] == "de"; then '[product.description_de]'; else '[product.description_en]']
By: Skrol29
Date: 2006-08-17
Time: 11:58

Re: String comparison

Hi,

You should not use " in the tbs TAG. The string delimiter is '.
[onload; if [var.lang] == 'da'; ...]
By: Preben Holm
Date: 2006-08-17
Time: 12:23

Re: String comparison

I'm pretty sure I started with that, but hey. It works now.
I must have had another syntax error then.