Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Shared resources (JavaScript) externally hosted?
Bowker
Is there a way to add a shared resource to a site, specifically a JavaScript file, that is hosted on another server?
An example would be Google maps API.
Find more posts tagged with
Comments
Rick Poulin
I'm guessing you're asking whether it's possible to get resources from outside the workarea added through the site/page resources wizard. The answer is unfortunately no. You could probably hack the page XML and make sure your layout stylesheet smartly accounts for that, but that surely has unknown negative side-effects.
I'm sure you're aware that you could do this with either a precontroller/external or by modifying the layout-level stylesheet. You could also have your component print the script tag in the body, but that doesn't work for everybody and all cases.
Bowker
I'm sure you're aware that you could ... or by modifying the layout-level stylesheet...
Ok - I'll bite, how do you add it to a fixed-layout stylesheet?
Rick Poulin
Hard-code it into your fixed-layout.page.xsl. This will load the file on every single page of every website you have on the platform though.
If you haven't modified this file yet, copy from iw-preview.war and put in livesite_customer_src/etc/classes/com/interwoven/xsl/runtime.