loading a javascript

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
SyntheticShield
Forum Members
Forum Members
Posts: 20
Joined: Thu Feb 02, 2006 5:11 am

loading a javascript

Post 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
User avatar
mesaverde
Forum Members
Forum Members
Posts: 15
Joined: Sat Apr 07, 2007 3:20 pm
Location: Colorado, USA

Re: loading a javascript

Post 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.
Last edited by mesaverde on Sat Jun 30, 2007 5:59 am, edited 1 time in total.
SyntheticShield
Forum Members
Forum Members
Posts: 20
Joined: Thu Feb 02, 2006 5:11 am

Re: loading a javascript

Post by SyntheticShield »

Brilliant idea.  I'll give that a try and see what happens.
Post Reply

Return to “CMSMS Core”