Forums/Tips & Tricks

If Statements

Marty Thomas
posted this on September 15, 2011 04:04 pm

You can use if statements in Purlem's landing page editor to display specific content based on the user visiting the landing page.

if('#variable' = 'Test','Value if true','Value if false')

Replace the #variable value with the result from the "Variable Content" dropdown in the editor.

 

For example, if I wanted to send a special message to all visitors from "XYZ Company", I would use:

if('#company' = 'XYZ Company','Welcome everybody from XYZ Company!',' ')

I just leave the Value if False value blank, as I don't want to show anything if the visitor is not from XYZ Company.

Screen_Shot_2011-09-15_at_4.06.55_PM.png 

This feature will also work with the not equals (!=) sign.
For example, if I wanted to send a special message to all visitors EXCEPT for those from "XYZ Company", I would use:

if('#company' != 'XYZ Company','You are not from XYZ Company',' ')