Jump to content

Elseif Tag For Email Templates


Michael

Recommended Posts

Template parse error: elseif tag doesn't exist

 

This is good if you want to do this:

 

{% if package.name == "Product A" %}

 

Whatever goes here.

 

{% elseif package.name == "Product B" %}

 

Whatever goes here.

 

{% else %}

 

This is for packages not listed above.

 

{% endif %}

Link to comment
Share on other sites

H2o is not designed to support grouped logic statements (i.e. an if combined with an else), as it intends to be simple, and currently allows both of those conditions to be used individually. You may want to consider simplifying your template such that you don't need a third condition.

Link to comment
Share on other sites

H2o is not designed to support grouped logic statements (i.e. an if combined with an else), as it intends to be simple, and currently allows both of those conditions to be used individually. You may want to consider simplifying your template such that you don't need a third condition.

 

So we need to use:

 

{% if %}

 

{% endif %}

 

That worked for me mate. Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...