Hi,
I want to use an external javascript file in the template, I copied the javascript file to the script folder but its not recognized, is there any different way to include it in the template?
thanks in advance
Please could you provide more information is this for Collaboration or Community? What is the Javascript file you're trying to include?
One approach is to edit the “customer_javascript.shtml” file, then you can add references to external javascript files, actual scripts.
For example, this includes the Dojo library.
<script type="text/javascript" src="/dojo-release-1.5.0/dojo/dojo.js" djConfig="parseOnLoad: false"></script>
I placed the referenced files in the [collabroot]/www directory.
You can also bring javascripts into almost any .shtml files, as appropriate for your customizations. The process is essentially the same as in any html file, just as long as you are mindful of the <ISPECT> tags and that a single collab page is built from many .shtml files.
Good luck!
Cody Coggins
Acuity Systems, LLC
From: eLink Entry: Vignette Collaboration Developers Forum [mailto:vignettecollaborationdevelopersforum@elinkkc.opentext.com] Sent: Tuesday, January 31, 2012 12:45 PMTo: eLink RecipientSubject: How to include external Javascript ?
How to include external Javascript ?
Posted by cparratt@opentext.com (Parratt, Christopher) On 01-31-2012 12:37
[To post a comment, use the normal reply function]
Topic:
Forum:
Vignette Collaboration Developers Forum
Content Server:
Knowledge Center
Thanks Chris and Coggins,
I'm trying to use jquery and some jquery plugins for few templates, customer_javascript.shtml has nothing within it - empty template, so how can I use the jquery and its plugins in this situation?
Hi Sarvanan,
We have a variable, 'pageLayoutJavascript' which needs to be assigned the template name where you are trying to include your javascript.
As Coggins mentioned, you can place your javascript files in collab_root/www/script directory.
To illustrate,
If your root template name is mytemplate.shtml,
add the line <ISPECT> pageLayoutJavascript="mytemplate_javascript.shtml"</ISPECT>
The content of mytemplate_javascript.shtml would be something like
<script type="text/javascript" src="/script/dojo-release-1.5.0/dojo/dojo.js" djConfig="parseOnLoad: false"></script>
Hope it works.
Regards,
Sree Ramya
From: eLink Entry: Vignette Collaboration Developers Forum [mailto:vignettecollaborationdevelopersforum@elinkkc.opentext.com] Sent: Wednesday, February 01, 2012 1:33 AMTo: eLink RecipientSubject: How to include external Javascript ? 2
How to include external Javascript ? 2
Posted by saravanan.arumugam@mbusa.com (Arumugam, Saravanan) On 01-31-2012 14:54