Currently I'm storing some custom metadata in the template like this:
{{!-- metadata{
"title": "Xmas Card",
"uipath": "aika/web/person",
"accept": "person",
"mimetype": "message/rfc822"
}--}}
From: kontakt@septima.dk
To: {{email}}
Subject: Merry Xmas
You and your family ...
This means I can expose a service to inform clients (system to system) which templates exist, what data they accept and return, and finally give them a user friendly title to display to the end user:
[
{
"title": "Personoplysninger",
"mimetype": "application/pdf",
"uipath": "aika/web/person",
"accept": "person",
"id": "LmNeYrxmvHFE8HQD",
"template": "personinfo"
},
{
"title": "Xmas Card",
"mimetype": "message/rfc822",
"uipath": "aika/web/person",
"accept": "person",
"id": "Y6rQ0wf5BYAWw6tT",
"template": "xmasmail"
}
]
Is there a better way of doing this? I've had a look at the localization extension which seems the closest to what I need.
Is that the way to go, should I continue what I'm doing, or have I missed something?
Thank you