Postmaster-for-Craft-CMS
Postmaster-for-Craft-CMS copied to clipboard
Extra Conditionals being omitted
When I add conditionals that should not validate (in other words, return false) the e-mail still gets send.
I check the entry type (Craft core data) and a custom field (entryLocale).
{% if entry.typeId != 6 %}false{% endif %}
{% if entry.entryLocale != "nl" %}false{% endif %}
Whenever the entryLocale is, i.e. "fr" the parcel still sends an e-mail. Any ideas?
From what I understand you need to write this code so that only one "false" can possibly get returned. The documentation does not currently make this clear, but if your code returns something like "falsefalse" that's not really being understood by Postmaster as false.
Try something like this:
{% if entry.typeId != 6 or entry.entryLocale != 'nl' %}false{% endif %}