Themes and levels test

This will (maybe) be a page that lists (and describes?) the Training Themes (and Levels?) and also allows you to pick a theme and see courses in that theme.

Using it for now to test putting the event listing filter in a custom sidebar. I can do that (and then use flex-direction to stack the filters) but there is a problem – you can’t currently use the event listing shortcode in more than one place. If you try and use it in the sidebar with showfilter=true showresult=false and vice versa in the content area, they get combined together. I need to dig into the code to see why that is – because it’s being created dynamically with js I suppose…

Yes, this happens in /scr/wp-content/plugins/vcsea-trainings/assets/js/eventlisting.js

NB to be exact about what happens – the filter/listing appears in one place only (the first place it is encountered I assume), and it is only the theme and level filters that are duplicated (next to each other).

Anyway, the reason is that the script uses:
const eventListingForm = document.getElementById('eventlisting-form');
So it depends on there being just that one element id existing. To fix (if desirable) would need to find *each* occurrence of the target element. That should work, right? Maybe, but would need to add ids to distinguish each form created to allow separate styling. Hmmm…


Money matters Leading your organisation Making an impact Planning for the future Voices and influence Partnership and collaboration