Menu icon Foundation
If-else in preheader

Hi I'm currently facing a problem with the preHeader in Foundation Email.

At the moment we have something like this defined

---
layout: default_transactional
type: single
preheader: More info regarding the maintenance license
---

Is there a way to set a {{#if}} {{else}} statement in the preheader.

I tried it but it won't get rendered. Other Variables like {{license.addonname}} getting rendered well.

 

Is this just not possible or is there a simple or maybe a complicated way to achieve this?

 

Thanks and have a nice day.

 

Best,

Steffen

email preheader if-else panini

Hi I'm currently facing a problem with the preHeader in Foundation Email.

At the moment we have something like this defined

---
layout: default_transactional
type: single
preheader: More info regarding the maintenance license
---

Is there a way to set a {{#if}} {{else}} statement in the preheader.

I tried it but it won't get rendered. Other Variables like {{license.addonname}} getting rendered well.

 

Is this just not possible or is there a simple or maybe a complicated way to achieve this?

 

Thanks and have a nice day.

 

Best,

Steffen

meret about 1 year ago

Did u try spy somebody with spy phone on Android? Is it work good? Where can we test it ? 

Brad Shomer about 1 year ago

I've been unable to use conditional statements in the front matter. You might be able to put the {{if}} {{else}} around the preheader in the body of the email and use a JSON or YML file to feed your preheader into the conditional statement.