javascript in content

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Anonymous

javascript in content

Post by Anonymous »

is there any way to add javascript into the content (withouh external libraries)? each time i do so i get a smarty template error.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: javascript in content

Post by Ted »

Anonymous wrote:is there any way to add javascript into the content (withouh external libraries)? each time i do so i get a smarty template error.
This is an easy one.

Wrap your javascript in {literal} tags.

Code: Select all

{literal}<__script__ language="javascript">print "hi";</__script>{/literal}
wishy
Post Reply

Return to “Developers Discussion”