By: Peter Schade
Date: 2005-08-04
Time: 11:06
|
wired behavior of if statement
Hello!
I have an db field homepagename wich data is "Märchen".
here is the code of html site:
<TD>[hplogozeig;if [val]==0;then <h1>[homepagename]</h1>;else <img src='[hplogo]' alt='[homepagename]'>;htmlconv=no]</TD>
if i generate the site it only replys:
<TD><h1>Mä</TD>
Is it a bug or have i understand something wrong?
Bye Peter
|
By: Skrol29
Date: 2005-08-04
Time: 11:12
|
Re: wired behavior of if statement
Probably a problem of quotes, try:
<TD>[hplogozeig;if [val]==0;then '<h1>[homepagename]</h1>';else '<img src="[hplogo]" alt="[homepagename]">';htmlconv=no]</TD>
|
|
By: Peter Schade
Date: 2005-08-04
Time: 11:18
|
Re: wired behavior of if statement
Yes this works, but if i use an string with ' it gets borked...
<TD>'<h1>Märchen 's</h1>';else '<img src="../uploads/" alt="Mä</TD>
|
By: Skrol29
Date: 2005-08-04
Time: 11:25
|
Re: wired behavior of if statement
Yes, that's why you can also escape the quotes :
[homepagename;htmlconv=esc]
|
By: Peter Schade
Date: 2005-08-04
Time: 11:34
|
Re: wired behavior of if statement
Thank you for your prompt help.
|
|
Posting in progress.
Please wait...
|