#Can we Add condition in Layout?

1 messages · Page 1 of 1 (latest)

austere kelpBOT
#

Hi @rocky crag, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question.

#

Answer

Currently, Novu layouts primarily serve as HTML designs or structures to wrap the content of email notifications, and there isn't explicit documentation on adding conditional statements directly within these layouts. The focus is on setting and using variables within layouts (1) .

For implementing dynamic content or conditions, you might consider managing this logic at the level of the templates or the workflow before applying the layout. While the layout defines the overall structure and style, any conditional logic related to the content should be handled within the templates that will be inserted into the layout via the {{{body}}} placeholder.

If you need dynamic behavior based on conditions directly within the layout, consider raising this as a feature request or discussion in the Novu community or GitHub to see if it can be supported in future updates.

For more information on working with layouts in Novu, see the Layouts documentation.

: Layouts

Sources
[1] Layouts