Page 1 of 1

include javascript/jquery

Posted: Thu Apr 04, 2013 8:08 pm
by Riqi
Hi There iam Riqi Here well i wanted to know how to include javascript code and file, css style sheet and jquery file code in a content page in cmsms i tried many times the effect is not showing so please guy please help me i really want this to develop my site,

With Regards,
Riqi

Re: include javascript/jquery

Posted: Thu Apr 04, 2013 9:26 pm
by Wishbone
What I would suggest is to make a simple HTML/jQuery page in an HTML file to make sure it works.

Create the exact same template and page associated with it in CMSMS. If it doesn't work, do a View Source on the page to see how it came out and compare. That should give you a clue as to what went wrong, and from there, we can figure out how to help you.

I have many sites that use jQuery in CMSMS.

One tip is to put {literal} {/literal} around your javascript, so that the template system doesn't think that your curly braces in your javascript code are tags. I'm told that this isn't necessary in Smarty3, but I continue to do so, as I have had some issues.

Re: include javascript/jquery

Posted: Thu Apr 11, 2013 11:22 am
by Riqi
Wishbone wrote:What I would suggest is to make a simple HTML/jQuery page in an HTML file to make sure it works.

Create the exact same template and page associated with it in CMSMS. If it doesn't work, do a View Source on the page to see how it came out and compare. That should give you a clue as to what went wrong, and from there, we can figure out how to help you.

I have many sites that use jQuery in CMSMS.

One tip is to put {literal} {/literal} around your javascript, so that the template system doesn't think that your curly braces in your javascript code are tags. I'm told that this isn't necessary in Smarty3, but I continue to do so, as I have had some issues.
{literal}really dont work i tried many times

Re: include javascript/jquery

Posted: Fri Apr 12, 2013 12:39 am
by Wishbone
Then do a view source and tell us what's not showing up right.

Re: include javascript/jquery

Posted: Tue Apr 16, 2013 8:43 pm
by Dr.CSS
Please give a link to the problem or show us how you try to include it...

I do:
make a folder in /uploads called js, upload script to it
call in template <head> <__script__ type="text/javascript" src='uploads/js/jqueryorjsfile.js'></__script>

Replace jqueryorjsfile with your file name...