Forms Module email layout
Created 6 years ago by kiltedup

Hi

Been using the Forms Module and all good except when adding a new Notification, I'd like to customise the Email Layout. But the dropdown for selecting Email Layout is empty and I'm stumped as to what needs to be added where to get some options in there.

'notification_email_layout'   => [
    'type'   => 'anomaly.field_type.select',
    'config' => [
        'handler' => 'emails',
    ],
],

Can anybody point me in the right direction?

Cheers,

Dave

ryanthompson  —  6 years ago Best Answer

The emails handler will look for twig views in your theme at /resources/layouts/emails

dwains  —  6 years ago

In the forms module you have in the left menu the Notifications link. Here you can make a new notification and also on the tab Content you can custom the e-mail content.

kiltedup  —  6 years ago

Hi,

I have got the notification and email content working however my issue is how do you set the email layout? There is a drop down to select which layout to use but it’s empty and I am stumped as to how to add email layouts to populate the selection.

Any ideas?

ryanthompson  —  6 years ago Best Answer

The emails handler will look for twig views in your theme at /resources/layouts/emails

kiltedup  —  6 years ago

Ah - perfect. Thanks Ryan.

I assume these twig views would be something like vendor/anomaly/streams-platform/resources/views/notifications/email.twig

ryanthompson  —  6 years ago

Ya that's what it uses by default