JavaScript Problems with X10 Multi-variant Site
Just started testing multiple variants with dynamic content in X10.
First problem, which should be easy to duplicate, is that all Javascript added to the page <head> appears multiple times, which shouldn't break the page but equally shouldn't happen.
Second is that the dynamic content, which should fill a placeholder using an AJAX call, works at desktop size but doesn't happen at mobile/tablet size. No errors are raised and the AJAX call is made corectly but then nothing.
Re: JavaScript Problems with X10 Multi-variant Site
It appears to occur once for each Variant.
If you add content to the Site head, you only get one instance.
The repeated code could be a problem for JavaScript variable instantiations.
It is not a good place to be.
Re the AJAX, it is possible the Placeholder needs to be renamed for each Variant? It could be populating the wrong Variant.
I would create different Names as the target for each one separately.
Acorn
Re: JavaScript Problems with X10 Multi-variant Site
Thank you, looks like you are right about the wrong placeholder, giving them different ids has got the small variant working. As the large variant is now broken I suspect all the dynamic content will have to be served with ids suited to the variation displayed.