Forum

Link to file in PCI

We have developed a number of PCI's that include the use of iframes to present different types of "games". The iframe's src-attribute refers to a webpage (index.html/php) that can include other scripts etc. We have struggled with finding out how to know the url of the index-script when it is part of the PCI-structure, but until now without luck.

We have therefore placed the game at another server and linked to it from the iframe. This is a very hackish solution, so we would like to do it right (the PCI's are going to be used by others, and they cannot depend on our server).

I tried to transform the index.html to a tpl and follow https://hub.taotesting.com/articles/frontend/architecture/amd-requirejs to include it in define(), but I keep getting a mime-type-error (TAO loads the tpl as a javascript-file, but the mimetype is not application/javascript, but text/html).

Is there a way to get the url of the PCI in javascript?

Thanks!

Sign In or Register to comment.

We use cookies on our website to support technical features that enhance your user experience. Cookie Policy Privacy Policy

×