N
Novu5mo ago
fyeung

Referencing step count in email layout

I am trying to conditionally show some elements based on step count (i.e. show different things when it is a digest message). It works fine when i do it on a workflow level, but it doesn't seem to be working as expected on a layout level. Is this expected as a limitation of layouts, or am I doing something incorrect? Example of what I am doing below. Thanks {{#equals step.total_count 1}} Just a single step {{else}} More than one step {{/equals}}
3 Replies
Pawan Jain
Pawan Jain5mo ago
@fyeung it is limitation of layout. layout is designed to have common styles and content and wrapper onto email content. step.total_count variable is available inside worklfow only @fyeung Did you get chance to checkout Novu framework, a new approach to build worklfow using code?
fyeung
fyeungOP5mo ago
not yet, but I will be sure to check it out. Thanks! is it essentially the same as echo but repackaged or is this a different product?
Pawan Jain
Pawan Jain5mo ago
Yes it is the same. Echo was temporary name
Want results from more Discord servers?
Add your server