Webmastersite.net
Register Log In

Need help with an IF statement
leave English if no foreign description

Comments on Need help with an IF statement

2222a
Member

Usergroup: Customer
Joined: May 13, 2007

Total Topics: 16
Total Comments: 37
2222a
Posted May 26, 2007 - 9:05 PM:

Thanks to WSN flexibility I am thinking and actually did try to change the link description on the category pages as well. I have an extra field to have a translation as well. With:
<br><IF {VISITORLANGUAGE} is English>{LINKDESCRIPTION}
<OTHERWISE IF {VISITORLANGUAGE} is Italian>{LINKITALIANDESC}</IF> <br></span> it works fine, but I need an IF statement to leave the english one if no italian one is present (all pages are described in english, but not all in Italian)

Essentially, the first IF needs to be nullified if no foreign langauge description is available for that listing.

thanks...

I am almost done smiling face
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 28, 2007 - 1:08 AM:

<IF {VISITORLANGUAGE} is English or not {LINKITALIAINDESC}>

Multi-term conditionals are erratic, so if that gives you a parse error you'll have to turn it into PHP:
<?php if ("{VISITORLANGUAGE}" == "English" or "{LINKITALIANDESC}" == "") { ?>
2222a
Member

Usergroup: Customer
Joined: May 13, 2007

Total Topics: 16
Total Comments: 37
2222a
Posted May 28, 2007 - 9:27 AM:

Good news that it can be done.
Bad news is that I couldn't get it to work wink; if no native langauge description is avail for some links, the description area stays blank when the english one ideally would show. (This is for the displaylinks.tpl.)

Before I go any further: will <IF {VISITORLANGUAGE} is English or not {LINKITALIAINDESC}> need to be inserted before, after or replace the

<IF {VISITORLANGUAGE} is English>{LINKDESCRIPTION} ....


thanks again,
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 07, 2007 - 1:14 PM:

Note for future readers:
<IF {VISITORLANGUAGE} is Shqip and {LINKSHQIPDESCBOOL}>{LINKSHQIPDESC}<OTHERWISE>{LINKDESCRIPTION}</IF> 
works.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.