tripadvisor widget
-
hi,
usually it's no problem to integrate scripts into LAY, but this one uses a URL as the function, which means it can't be wrapped in:
window.laytheme.on("newpageshown", function(layoutObj, type, obj){
});
can anyone help with this?
<div id="TA_certificateOfExcellence176" class="TA_certificateOfExcellence"><ul id="qyZP9Xq" class="TA_links uebl3Xmuf0G"><li id="47IvIet6" class="sjQ1Y8"><a target="_blank" href="https://www.tripadvisor.com/Attraction_Review-g187147-d7675416-Reviews-Parisitour-Paris_Ile_de_France.html"><img src="https://www.tripadvisor.com/img/cdsi/img2/awards/CoE2017_WidgetAsset-14348-2.png" alt="TripAdvisor" class="widCOEImg" id="CDSWIDCOELOGO"/></a></li></ul></div>
<script async src="https://www.jscache.com/wejs?wtype=certificateOfExcellence&uniq=176&locationId=7675416&lang=en_US&year=2019&display_version=2" data-loadtrk onload="this.loadtrk=true"></script>
-
Dear @dani
the code you are embedding with the link (https://www.jscache.com/wejs?wtype=certificateOfExcellence&uniq=176&locationId=7675416&lang=en_US&year=2019&display_version=2) is pretty short when opened.Maybe LAY cannot read it because it uses a different way of loading JS:
http://laytheme.com/documentation.html#custom-javascriptCan you rewrite it maybe?
Best!
Marius
-
I can't rewrite it because it comes from Trip Advisor.
I tried embedding the returned function like this:
<script>
window.laytheme.on("newpageshown", function(layoutObj, type, obj){(function(t,r,i,p){i=t.createElement(r);i.src="https://www.tripadvisor.com/WidgetEmbed-certificateOfExcellence?year=2019&locationId=7675416&display_version=2&uniq=176&lang=en_US";i.async=true;p=t.getElementsByTagName(r)[0];p.parentNode.insertBefore(i,p)})(document,"script");
});
</script>but doesn't work either.
-
Dear @dani
then we might not be able to use this widget.Is there a URL on Tripadvisor to which you can link to instead?
Best!
Marius
-
-
Dear @dani
we hope to release a PHP version of LayTheme. Then this will be possible :-DBest!
Marius
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login