Closed iMiMWeis closed 1 week ago
Not so much only a problem of the export command, might also be a problem on how to assign those different templates (we could add a .1
,.2
and so on suffix during the export) in the flow builder, right?
Isn't this as easy as it sounds?
Not sure, about how to assign them in the flow builder. The export is probably not the problem. Is this what you mean @fgiering ?
We always put a description in the description field. The flow-builder is showing this to seperate between same template-types. Does the plugin export and import the description field? Isn't this an "replace-problem" on the import of the same teamplate-type?
As I understand it, the plugin does not import anything.
There is a export-to-theme function which creates the twig files based on the type of the mails in the database. Then, when sending emails, the extensions seems to pick up the template from the filesystem, based on the type.
If you have multiple different templates with the same type and chose different ones in the flow builder, still both templates of that type would pull the same template.
This is also visible in the email template list:
It needs some concept how to implement that. Maybe in the database, a twig template could be linked and we still could create email template entries in the admin panel.
Yes. I see. Some mapping would be necessary.
@shyim what do you think about this?
Idea would be to store the templates like this ...
$targetFile = sprintf('%s/%s/%s.twig', $templateDir, Uuid::fromBytesToHex($record['id']), $name);
Implemented in #75
What's still seems to be missing the the indication in the admin panel, that a template is overwritten. EDIT: it is working, just forgot to build admin assets
I have exported templates to files using the
frosh:template-mail:export
command. I have noticed, that some templates were not created, due to them being assigned to the same type.It would be great if this plugin supported multiple templates per type.
Currently the identifier for email templates is the template type. However this would not work with multiple templates per type.