It could be useful to have a link for each type of event, so you can easily share and promote a specific event type
Hi there and welcome to the Community, @CinemaFILO_Cremona ![]()
Please let me check with the devs if it’s possible to implement this idea using a custom script. I’ll report back once I have their response ![]()
Hi there, @CinemaFILO_Cremona ![]()
Thank you for waiting!
Our devs came up with a custom solution and I’ll send it to you in a personal message.
We also agree that it would be great to have this option right in the settings. If more users upvote this idea, we’ll try to consider it in the future ![]()
Folks, if you’d also want to implement this functionality, please replace your widget’s installation code with this one:
<script data-elfsight-ec-installer>
(() => {
const WIDGET_ID = 'YOUR_WIDGET_ID';
const PARAM_MAP = {
'event-type': 'data-elfsight-app-filter-event-type'
};
const self = document.currentScript ||
document.querySelector('script[data-elfsight-ec-installer]');
if (!self) return;
const params = new URLSearchParams(window.location.search);
const app = document.createElement('div');
app.className = `elfsight-app-${WIDGET_ID}`;
app.setAttribute('data-elfsight-app-lazy', '');
Object.entries(PARAM_MAP).forEach(([param, attr]) => {
const values = params.getAll(param)
.join(';')
.split(';')
.map((v) => v.trim())
.filter(Boolean);
if (values.length) {
app.setAttribute(attr, values.join('; '));
}
});
self.replaceWith(app);
if (!document.querySelector('script[src*="elfsightcdn.com/platform.js"]')) {
const platform = document.createElement('script');
platform.src = 'https://elfsightcdn.com/platform.js';
platform.async = true;
document.head.appendChild(platform);
}
})();
</script>
Important: Do not forget to replace
YOUR_WIDGET_IDin the 3rd line with your actual widget ID
1 Like