Support

Home Forums Event Espresso Premium Custom Email templates: Use of Message Shortcodes

Custom Email templates: Use of Message Shortcodes

Posted: April 27, 2017 at 7:00 am

Viewing 3 reply threads


greyowl

April 27, 2017 at 7:00 am

There is a list of Message Shortcodes, but when I try to use some of them, I get an error message:
An error has occurred:
The following shortcodes were found in the “Main Content” field that ARE not valid: [EVENT_LINK],[EVENT_URL],[contact@walterlernt.ch]
Why is this? Can I customise Message Shortcodes or add new ones?


Tony

  • Support Staff

April 27, 2017 at 7:46 am

Hi there,

The following shortcodes were found in the “Main Content” field that ARE not valid: [EVENT_LINK],[EVENT_URL],[contact@walterlernt.ch]
Why is this?

It depends on exactly which message template, but the EVENT_ shortcodes are event based, meaning they need access to the event to parse to the correct details.

The main content of the email does not have access to the event object so can’t output the details directly like that.

For each section of the template, you can click the stacked icon to the right to show you all of the available shortcodes for that section.

Which message template are you editing?

Can I customise Message Shortcodes or add new ones?

Yes but not in the way you have above, I’m not sure what [contact@walterlernt.ch] is trying to do?

If you want to include the email address you can include it within the email rather than wrapping the email you want to include within a shortcode and using that as a shortcode?

Adding custom shortcodes will require custom development, you can see an example of custom shortcodes here:

https://gist.github.com/Pebblo/e87cc8e30c4848dcdfe2


greyowl

April 27, 2017 at 9:22 am

I’m customising a message template. Of course it doesn’t yet know which event it will be used for; that only comes when I use the ‘Send Batch Message’ feature. But I would have thought I could insert the shortcodes which will be interpreted at the time of using that batch template.
I also tried to enter a sender email address that was neither [CO_EMAIL] nor [SITE_ADMIN_EMAIL]. I guess I got the syntax wrong; I have now succeeded.


Tony

  • Support Staff

April 27, 2017 at 9:40 am

I’m customising a message template.

I’m not sure what this is answering? I know you’re editing a message template.

Of course it doesn’t yet know which event it will be used for; that only comes when I use the ‘Send Batch Message’ feature.

Sounds like you confusing a specific event with the event object.

Most of the event the message templates don’t need to know the specific event it is for when editing, but it does need to know which event is is for when the template is used.

The event object is passed around sections of the template, you can’t use all shortcodes in all sections (for example if the main content isn’t passed the event object, which it isn’t, you can’t use event based shortcodes in that section.

But I would have thought I could insert the shortcodes which will be interpreted at the time of using that batch template.

That is how it works, but again it depends on what data is available for the specific message template and the specific ‘section’ within that template you are in has available to it.

The batch message does not currently have access to the event object, its sent to the registrant so has the registration object, but not the event. You can use the stacked icon to see which shortcodes are available within each section – http://take.ms/QXQx4

Viewing 3 reply threads

The support post ‘Custom Email templates: Use of Message Shortcodes’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso