Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Impossible to check value of variable?

Avatar

Avatar
Level 1
Neolaned
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Neolaned
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
Neolaned
Level 1

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)