[ic] [Include] Interpolating Javascript

Davor Ocelic docelic at spinlocksolutions.com
Tue Apr 29 11:59:24 UTC 2008

On Tue, 29 Apr 2008 07:51:10 -0400
Sam Batschelet <sam at westbranchresort.com> wrote:

> Ic 5.5.1 
> I am trying to include an external js file which needs to be
> interpolated and I would like to verify what I am reading in the docs.
> Js script resides http://mydomain.com/js/script.js
> Code I am using
> [include file "/js/script.js"]

[include file="/js/script.js"]  (note the equal sign)

or just 

[include /js/script.js]

Also note that the include path is not an URL, but a real
path on the disk, relative to catalog root directory.

So your example above probably won't work in any scenario, as
there's no /js directory on the system nor you'd be able to 
access absolute paths from catalog context.

If your js code is in /var/www/js/, then you would create
a symlink to it from your catalog root, such as

cd /path/to/catalog
ln -sf /var/www/js .

and then use

[include js/script.js]

in your pages.


More information about the interchange-users mailing list