Closed emodric closed 7 years ago
Added new semantic configuration for templates, actions and default fallback values. So example config looks like this:
netgen_information_collection:
system:
default:
templates:
default: "AcmeBundle:email:default.html.twig"
content_types:
content_type_1: "AcmeBundle:email:content_type_1.html.twig"
content_type_2: "AcmeBundle:email:content_type_2.html.twig"
fallback_values:
sender: 'sender@example.com'
recipient: 'recipient@example.com'
subject: 'Email from Acme website'
actions:
default:
- email
- database
content_types:
content_type_1:
- some_custom_action
content_type_2:
- some_custom_action
I propose a slight reorganization of settings to be something like this (since all of it is related to email action, after all):
netgen_information_collection:
system:
default:
action_config:
email:
templates:
default: ...
content_types:
type_1: ...
default_variables:
sender: ...
recipient: ...
subject: ...
Implemented as described above.
It would be great to have a semantic configuration for email templates, so we don't have to override the config by using container params.
As an alternative, consider using eZ Publish view layer, so you can render the template simply by rendering a sub controller, as was done in eZ Publish legacy with
collectedinfo
andcollectedinfomail
view types.