flat-rose-25983
12/16/2021, 3:48 PMmagnificent-energy-493
Templates use the golang template engine in thepackage for rendering thetext/template
andemail.subject.gotmpl
templates, and theemail.body.plaintext.gotmpl
package for rendering thehtml/template
template: https://pkg.go.dev/text/template > https://pkg.go.dev/html/templateemail.body.gotmpl
Templates can use the Sprig library, which provides more than 100 commonly used template functions: http://masterminds.github.io/sprig/Let me know if that helped 🙌
flat-rose-25983
12/17/2021, 11:16 AMmagnificent-energy-493
{{ upper .Identity.traits.firstName }},
https://www.ory.sh/kratos/docs/concepts/email-sms/#nested-templates
or
{{ .Identity.traits.firstName }}
It depends how your identity schema looks, can you share it maybe?flat-rose-25983
12/17/2021, 1:04 PM{
"$id": "<https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json>",
"$schema": "<http://json-schema.org/draft-07/schema#>",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"minLength": 3,
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"password": {
"identifier": true
}
},
"verification": {
"via": "email"
},
"recovery": {
"via": "email"
}
}
},
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"email"
],
"additionalProperties": false
}
}
}
magnificent-energy-493
{{ .Identity.traits.name }}
should work 🤔
Are you able to share a reproducible repo? That would help in figuring out where the issue is. You can also share it private with my github if you preferflat-rose-25983
12/22/2021, 11:16 AM