Is there a list of supported template fields?

I’m trying to customize our welcome letter, and I can see that there are known field tokens, like:

Welcome to %{site_name}!

Is there a list anywhere of all the valid tokens that can go in a %{token} block?

That’s about the only one. So there is not a list because there aren’t many fields.

The full current list is here:

https://github.com/discourse/discourse/blob/master/lib/email/message_builder.rb#L24-L54

2 个赞

In other words, anything passed in via @opts as well. Have fun tracing that throughout the calling code…

@sam: thanks for this.

我想重复原来的问题。现在有列表了吗?我想知道在文本自定义中可以使用哪些内容。

上面的答案 不正确吗?

也许是这样,但如果是这样,我就不明白了。

我在下面的截图中为您高亮了相关的代码部分

通常您要找的是“将 {%placeholder} 替换为其他文本”

谢谢!我会看看的。