Messages System: Message Templates
Message Templates are the blueprint for what the message will look like when its assembled. This is a very powerful component to the messages system because it allows for more granular control of the “looks” of outgoing messages.
The important thing to remember about message templates, is that there is a message template for each messenger, message type, and context combination. So for example, there is a template for the email messenger, registration approved message type, and Event Admin recipient (context).
Each message template will have fields that are defined by the messenger primarily but also supplemented by the message type if there are any additional fields required by the message type. For instance, all email templates will have to, from, subject and main content fields.
You will see other fields like
[attendee_list]etc in the message templates. These are special fields related to messages shortcodes.
When you activate Event Espresso, the message system comes with default global templates out of the box that will help you get started right away with your events without having to do any editing. However you are able to edit any of these templates.
Difference between Global and Event specific templates
One more powerful feature with the new messages system is that by default, global templates will apply to every trigger happening with an event. So that means, for example, when a registration is approved (the trigger), all the global templates using the Registration Approved message type get sent. However, the messages system also allows Event Authors to create a custom template for that message type to be used only for that event. If this is done, then when the Registration Approved message type is triggered the message template for that event is used instead of the global message template. This allows you to differentiate different automatic messages for different events.
- Enqueue your own styles or scripts via this hook (and just add the regular wp_enqueue_style() etc in your function):
That should load any CSS scripts/styles AFTER the messages styles/scripts.
- Learn about Registering a Messages Template Variation