kiltedup - 2 months ago

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

Answer

ryanthompson - 2 months ago

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

dwains - 2 months 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 - 2 months 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 - 2 months ago

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

kiltedup - 2 months ago

Ah - perfect. Thanks Ryan.

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

ryanthompson - 2 months ago

Ya that's what it uses by default