0

I am trying to figure out mandrill conditional statements and have done a lot of reseach but cannot figure this out.

My logic looks like this:

*|IF:house=true|*
   House,  
*|END:IF|* 

*|IF:garden=true|*
    Garden,  
*|END:IF|*  

*|house!=true && garden=!true|*                                        
    House and Garden not included
*|END:IF|*   

I thought this answer would help me solve it but still cannot figure it out. I have tried all sorts of variations, but it is still not working.

Any help would be greatly appreciated.

Community
  • 1
  • 1

1 Answers1

0

First off, I'm assuming you simply forgot the last :IF on the last condition when posting the question.

Regardless the format for the last condition is wrong. When you want to check two conditions simultaneously, the :IFs must be nested like so:

*|IF:MERGE1=x|*
    *|IF:MERGE2=y|*
          <div mc:edit="main"> 
                <p>content to display if both conditions are true</p>
           </div>
    *|END:IF|*
*|END:IF|*

Also, make sure you are passing the value for houseand garden variables when they are false.

If when these two variables are false, the value isn't forwarded, then you need to use the :IFNOT tag:

*|IFNOT:MERGE|*
    content to display if MERGE is not provided
*|END:IF|*

So in your case the last condition would be:

*|IF:house!=true|* 
    *|IF:garden!=true|*                                        
        House and Garden not included
    *|END:IF|*
*|END:IF|*

Read more on mandrill conditional merge tags here.

gdvalderrama
  • 713
  • 1
  • 17
  • 26