Posted: March 1, 2019 at 3:56 pm
|
Hi, A while back someone experienced the same issue I’m currently having trying to customize message templates so they render properly in Outlook. Unfortunately, the majority of my client’s customers use Outlook – so I need a way to make the emails look presentable using Outlook. the original thread is: https://eventespresso.com/topic/email-template-conditional-tags-support/ In there you provided a code snippet: https://gist.github.com/Pebblo/e03fe3a4fe02c2803a8786e63b8d6978 The issue I’m having is that the errors I’m receiving are not in the “Event_List” field as the original support thread, mine are found in “Main Content” field. So my error message looks like this when I try to save the message: The following shortcodes were found in the “Main Content” field that ARE not valid: [class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body],[class=body] How would I update that code snippet to reflect this? Many thanks in advance for your help! |
Hi Lisa, That snippet adds 3 shortcodes to the messaging system, those are:
The shortcode that is being rejected on your site is May I ask how you are using that shortcode and what you are expecting it to output? If you can add a list of shortcodes you need here I can add them to the above snippet. |
|
|
Hi Tony, Yes, I replaced the 3 snippets with my one shortcode [class=body]. However, the issue I’m running into is defining the section I want this shortcode to work in. Note the error I’m getting: The following shortcodes were found in the “Main Content” field that ARE not valid: [class=body] Right now, it looks like that starts on line 6 of that code snippet. I am using the “Main Content” area (the area where the default template is), but that is not one of the sections defined. How would I add that? thanks, |
Yes, I understand the problem, however, sections use specific shortcodes types depending on the details they have available to them and the ‘Main Content’ section would allow the shortcode if it was defined as part of Can you post the code you are using on the site so I can take a look? |
|
|
|
Thank you, which message type are you editing currently? If you click on the icon I highlighted in my screenshot, is the shortcode listed there? |
|
|
Hi Tony, Hopefully fixing this will solve the issue! Thanks for your help!!! |
Yeah, nice catch. Here’s another option which may come in useful if you need multiple custom shortcodes to be output as ‘shortcode’, ie See this change which adds a This code parses the shortcode. So for the above, you could use: It’s a little more flexible but as it stands can only be used to output |
|
The support post ‘Help with customizing message for Outlook – conditional tags’ 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.