Digest templates with 1 event total
It appears that digests that end up having only one trigger by the time they expire still pass step.digest and step.events to templates. Is there a suggested way to have a template still render a single-event branch in this case? I don’t think I can do an equality check of step.events.length and 1 inside the handlebars template, can I?
5 Replies
@Mei
How about using condition in template
https://docs.novu.co/workflows/digest#writing-digest-templates
How exactly does one write a condition that checks if the length of the list is 1? You can’t just write
{{#if step.events.length = 1}}
Use
equals
helper with step.total_count
https://docs.novu.co/content-creation-design/handlebars-helpers#equalsThanks!