Javascript in templates

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
fuquam

Javascript in templates

Post by fuquam »

I searched the forum but couldn't find answers. I want to ad some simple javascript to my template but I get error messages. A similar thing happened when I tried adding PHP but I figured out how to create a user defined tag and ad the PHP that way. Everything works fine with PHP now. Javascript isn't working out the same way. Any ideas?
Thanks.
wuschel

Re: Javascript in templates

Post by wuschel »

{literal}  your javascript {/literal}
User avatar
mesaverde
Forum Members
Forum Members
Posts: 15
Joined: Sat Apr 07, 2007 3:20 pm
Location: Colorado, USA

Re: Javascript in templates

Post by mesaverde »

If you want the script in the header section of the webpage you can include a 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.
Post Reply

Return to “Tips and Tricks”