Impossible to check value of variable?

Avatar

Avatar

Neolaned

Avatar

Neolaned

Neolaned

17-03-2016

We use Neolane 6.1 and in a "Javascript template" we do a check to see if we got an image or not. Before this template runs we set the value '0' if there's no image, consider this code:

var newsImage = '' + content.@img; // string???

if (newsImage && newsImage.length > 4 && newsImage != '' && newsImage != '0') {

  // shows image if image URL and if newsImage == '0' 😮

} else {

  // should end up here if newsImage == '0' but it wont, is this javascript or what is it???

}

Accepted Solutions (0)

Answers (0)