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 are asking if they can use conditional statements in email templates when migrating from Supabase to Appwrite. One user had a line of code in Go templates that used a conditional to personalize greetings. It's unclear how to replicate this in Appwrite, as the documentation lacks information on the 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