Webmastersite.net
Register Log In

Conditionals Syntax Question
how to specify empty text string?

Comments on Conditionals Syntax Question

michael_d
Beginner

Usergroup: Customer
Joined: Feb 07, 2005

Total Topics: 3
Total Comments: 5
Posted Jul 15, 2006 - 12:42 AM:

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!
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Jul 16, 2006 - 6:09 PM:

I understand that you can use:

<IF {MYCUSTOMVAR}>
<img src="templates/default/images/{MYCUSTOMVAR}.png"
<OTHERWISE>
<img src="templates/default/images/image1.png"
</IF>
michael_d
Beginner

Usergroup: Customer
Joined: Feb 07, 2005

Total Topics: 3
Total Comments: 5
Posted Jul 16, 2006 - 6:48 PM:

It works! Thanks, peumus!!!
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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