Hi, I'm trying to create a condition where it checks if the text string variable is empty, like this:
<IF {MYCUSTOMVAR} is emptystring> <img src="templates/default/images/image1.png" <OTHERWISE> <img src="templates/default/images/{MYCUSTOMVAR}.png" </IF>
So, if there is nothing in the custom text field (empty text string) it displays image1.png. Otherwise - it displays file specified in the custom text field.
What is the proper syntax for this like: <IF {MYCUSTOMVAR} is emptystring> (what to put insead of emptystring)?
Comments on Conditionals Syntax Question
Beginner
Usergroup: Customer
Joined: Feb 07, 2005
Total Topics: 3
Total Comments: 5
Hi, I'm trying to create a condition where it checks if the text string variable is empty, like this:
<IF {MYCUSTOMVAR} is emptystring>
<img src="templates/default/images/image1.png"
<OTHERWISE>
<img src="templates/default/images/{MYCUSTOMVAR}.png"
</IF>
So, if there is nothing in the custom text field (empty text string) it displays image1.png. Otherwise - it displays file specified in the custom text field.
What is the proper syntax for this like: <IF {MYCUSTOMVAR} is emptystring> (what to put insead of emptystring)?
Thanks!
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
I understand that you can use:
<IF {MYCUSTOMVAR}>
<img src="templates/default/images/{MYCUSTOMVAR}.png"
<OTHERWISE>
<img src="templates/default/images/image1.png"
</IF>
Beginner
Usergroup: Customer
Joined: Feb 07, 2005
Total Topics: 3
Total Comments: 5
It works! Thanks, peumus!!!