I’m trying to set the layout to my mail templates defined in my plugin but the backend never shows it, it shows ‘no layout’. I have to select it manually from the dropdown list in order to set the layout of my templates.
this layout is registered with the registerMailLayouts method in my plugin.
layout = "tll-default"
subject = "Welcome Back to the Community!"
Did you add the layout to the template after it was created in the backend? Try deleting the template and it should recreate, hopefully with the layout selected.
Ok I think I see why it happens, the MailLayout is cached in memory. So if a layout and a template is created in the same request, it can’t find the layout.
Added a fix for it in v4.2.21. Let me know if it helps after it has been released.