I’ve encountered an issue when using the [EVENT_CUSTOM_VIEW] shortcode more than once on a single page. Here is the page:
nyfamilylife.org/store/register
I’ve used used your instruction here for modifying the list template that comes in the Custom Template Add-on plugin.
I’ve then called the shortcode “[EVENT_CUSTOM_VIEW template_name=”mp-events-table”] three different times in the same page to create three separate lists that can be sorted.
The problem arises when I try to filter one of the lists, and the javascript causes the other 2 lists to filter as well. All three lists seemed connected or referencing the same table that is being sorted.
How do I make each list independent, so that I can sort one list without having the other listed automatically sorted as well?
I looked into this and found with a few modifications to the Custom Template Add-on and the events-table template this can be achieved.
If you want to use the same template multiple times then the easiest way to do this is with a shortcode attribute. So I would alter the shortcodes to have a unique identifier within each of them, so for example:
Then modify the template so that template_identifier can be within the event tables to make each unique.
I thought this would be a good addition to the events table template so included some code to do this within the default template. This will be included within the next update to the Custom Template Add-on.
However until that is released, here is a copy of the template I created to test this:
The support post ‘Calling [EVENT_CUSTOM_VIEW] shortcode more than once in a single page’ 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.
Support forum for the Custom Files add-on for EE3.