Where can I get a list of all placeholders that can be used in email templates?

(Nordize) #1

As the title says. And sorry if this was posted anywhere (I couldn’t find it).

Do I have to dig in the sources or are they nicely laid out in some topic/docs? If I need to dig in the sources, where is the best place to find them all? (/config/system/*.yml ?)

Also, I believe most are contextual, e.g. only a subset of placeholders are available for the “User Invited to PM” email … how do I find out which placeholders are available? A pointer to the relevant source?

(Daniela) #2

You can find them in /admin/customize/site_texts (e.g. try to search user_notifications.user_invited_to_private_message_pm.title) and in /admin/customize/email_templates

(Nordize) #3

But that’s what I meant … I’d like to know which placeholders/tags I can use for each email template (I already know where to find the email templates). By placeholders/tags I mean stuff like %{site_title}. Taking the templates in the GUI one by one is preceisely what I want to avoid, and it would still not tell me which other placeholders are available to use oin some particular template.

I found a lot of them listed in discourse/server.en.yml at master · discourse/discourse · GitHub … but that’s a huge file that has a lot of other stuff in between and isn’t clear which placeholders/tags can be used in which message template.

There should be some minimal docs or something given the user can edit templates. A user should be know which placeholders/tags are available…