Jump to content

Recommended Posts

Posted

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 %}

Posted

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.

Posted

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...