Back

Can i have conditional statements inside email templates?

  • 1
  • Self Hosted
  • Auth
  • Messaging
LUNATIC
8 Sep, 2024, 14:25

As I’m migrating my code from using Supabase to Appwrite, I’ve encountered an issue with migrating the email templates. Supabase uses Go templates, and in one of my email templates i had a line that looked like this: {{ if .Data.full_name }}Hi {{ .Data.full_name }} 👋,{{ else }}Hi There 👋,{{ end }} However, I’m unsure how to replicate this in Appwrite, as the documentation does not specify which templating language Appwrite uses.

TL;DR
Developers migrating from Supabase to Appwrite are having trouble replicating conditional statements in email templates. The user wants to know how to recreate a conditional statement in Appwrite's templating language.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more