Support

Home Forums Event Espresso Premium Sort custom message templates

Sort custom message templates

Posted: November 30, 2017 at 6:37 am

Viewing 3 reply threads


greyowl

November 30, 2017 at 6:37 am

I have quite a lot of custom message templates with similar names, but they aren’t in any particular order. Is there a way to sort them alphabetically by Template Name (if possible automatically)?


Tony

  • Support Staff

November 30, 2017 at 3:54 pm

Hi there,

I can’t see any filters you can use to sort the order from within the query, but you can use some jQuery to sort the select inputs using the browser, add this snippet to a Custom Functions Plugin on your site:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/tw_ee_event_editor_jquery_message_templates_sort.php


greyowl

December 6, 2017 at 9:05 am

Hi Tony

We have added that code to the end of functions.php (which you can check through Design/Editor, using the Admin login I send earlier for my previous problem). It has not corrected the sort sequence of the custom message template names.
P.S. I notice that the comment in that snippet refers to “the message templates shown in the ‘Notifications’ section” and not the custom message template names.


Tony

  • Support Staff

December 6, 2017 at 10:30 am

We have added that code to the end of functions.php (which you can check through Design/Editor, using the Admin login I send earlier for my previous problem)

Unless that was today for a recent issue we don’t have your details any longer, we do not store any login details for any longer than needed for security.

It has not corrected the sort sequence of the custom message template names.
P.S. I notice that the comment in that snippet refers to “the message templates shown in the ‘Notifications’ section” and not the custom message template names.

Those are still Custom Message Template names, I assumed that would be the location you needed sorting – http://take.ms/x2auB

So you want the Custom Templates organized by name within Event Espresso -> Messages -> Custom Message Templates?

Currently, we don’t have any sorting on page load there, its sorted by GRP_ID by default. However you can add the ‘Template Name’ as a sortable column, so you can load the list and then click the column header to sort the templates, like so – http://take.ms/4QLYQ

To do that you would use this snippet:

https://gist.github.com/Pebblo/7ce05e9928ecbffc3d3f3bed64babeca

If that’s not the section you are referring to, can you post a screenshot highlighting were you want the sorting to happen, please?

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

Viewing 3 reply threads

The support post ‘Sort custom message templates’ 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