Creating a new template problems with java script?

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
TJINAK
Forum Members
Forum Members
Posts: 136
Joined: Wed Feb 22, 2006 1:01 am

Creating a new template problems with java script?

Post by TJINAK »

Hello,

I'm trying to create my own cmsms template based on a home page for a site I have.

The page that I'm using to make my template is using html tables, images, and java script. 

I started by creating a blank template and pasting my html into the template.  I saved the template as cpo_home.

Then I uploaded all the required images to my cmsms images dir.

Finally I went to create a new page based on my template but ran into problems.  Here you will find the errors i'm getting.

http://pcs-alaska.com/mjustindmd/template_error.htm

Although, I'm not a programmer it looks like the java script is creating the problems.

Can anyone please advise I how I might resolve these issues.

Thank you for your time and consideration,

Tim

Here is the template I've created:

Central Peninsula Orthodontics










mmLoadMenus();

 
   
   
   
   
   
   
   
   
   
   
   
   
 

 
   
   
 
 
   
   



   
   
 
 
   
   
 
 
   
   
   
   
 
 
   
   
 
 
   
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
   
 
 
   
   
   
 
 
   
   
 
 
   
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
    
   
 









Last edited by TJINAK on Mon Apr 23, 2007 2:02 am, edited 1 time in total.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Creating a new template problems with java script?

Post by JohnnyB »

yep, it looks like a template error.  It is actually smarty (the templating system) telling you that something is wrong in your template.

You need to wrap your javascript in the {literal}{/literal} tags.

Or, create an external javascript file(s) and link to them inside the head.

For example:

{literal}


{/literal]

OR




BTW.  this is depracted (the old and soon to be unsupported method) of writing a javascript tag:
You should be using:
Also, it will help you out if you are using a DOCTYPE above the
see:
http://wiki.cmsmadesimple.org/index.php ... _Templates
and
http://wiki.cmsmadesimple.org/index.php ... /Templates

To get started with your templates.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
TJINAK
Forum Members
Forum Members
Posts: 136
Joined: Wed Feb 22, 2006 1:01 am

Re: Creating a new template problems with java script? [RESOLVED]

Post by TJINAK »

Thank you very much for your reply!

I've made the changes and they worked perfect!

My first design that I've plugged into cmsms!

A very BIG THANK YOU FROM ALASKA!!

I also appreciate the link you sent I will read them and bring my code up to date.

Tim
Last edited by TJINAK on Mon Apr 23, 2007 3:13 am, edited 1 time in total.
cyberman

Re: Creating a new template problems with java script?

Post by cyberman »

For multiple javascript inserts you can use this nice plugin :)

http://forum.cmsmadesimple.org/index.ph ... l#msg51635
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Creating a new template problems with java script?

Post by JohnnyB »

cyberman wrote: For multiple javascript inserts you can use this nice plugin :)

http://forum.cmsmadesimple.org/index.ph ... l#msg51635
This is very cool!  does this create one file on the fly for all the JS in the directory? Or, does it load each JS file individually.

(I suppose I could test it to answer my question, but I don't have a site that is in development at the moment with JS...)
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
cyberman

Re: Creating a new template problems with java script?

Post by cyberman »

mww wrote: does it load each JS file individually.
Yep.
Post Reply

Return to “CMSMS Core”