Page 1 of 1

loading a javascript

Posted: Sat Jun 30, 2007 2:08 am
by SyntheticShield
I was playing around with NiftyCube in CMSms and while I can manually add the link to the javascript file in the template header, is there anyway to link it to the template like you do with CSS files.

I wonder if this is a feature that can be added if not already a part of the system?  I love how I can create a template and then just link it to the style sheets using {stylesheet}, as many as you need actually.  It would be neat if you could do this with other files like javascript using {javascript} or something like that.  Im not much on using javascript, but in the case of NiftyCube, if a visitor has javascript disabled it doesnt wreck the site and it doesnt destroy validation.

Anyway, if anyone has any ideas I would appreciate hearing them

Re: loading a javascript

Posted: Sat Jun 30, 2007 5:57 am
by mesaverde
You can include a script tag like this

Code: Select all

<__script__ src="xxx.js">
in the metatag section on the add/edit content page. You'll find that under the option tab. This will put the script tag in the header of your page and will link to your script file.

Re: loading a javascript

Posted: Sun Jul 01, 2007 3:22 am
by SyntheticShield
Brilliant idea.  I'll give that a try and see what happens.