X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   I can't add a layer in Dreamweaver (https://forum.x-cart.com/showthread.php?t=12630)

breitman 03-06-2005 01:20 PM

I can't add a layer in Dreamweaver
 
Hello there, I want to add a layer with Dreamweaver in the customer/home.tpl file. When the layer is empty, no problem, but as soon as I put something in it I get this error message.

Fatal error: Smarty error: [in customer/home.tpl line 10]: syntax error: unrecognized tag: //reloads the window if Nav4 resized if (init==true) with (navigator) in /home/gcolor/public_html/catalog/Smarty-2.6.3/Smarty.class.php on line 1082
What's wrong? I never touched the line 10.
Can someone help me.Please thanks Nicole
Version 4 on Windows.

Emerson 03-06-2005 01:50 PM

When you create a layer with dreamweaver, it adds some javascript code to the page.
Something like:
Code:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>


Wrap it in {literal}{/literal} tags...

Make it look like:
Code:

{literal}<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>{/literal}


HTH ;)

balinor 03-06-2005 01:51 PM

Hi Nicole...editing templates with Dreamweaver can be tricky, as you have to actually look at the code view and not just the graphic view. There are Smarty tags imbedded in the code, and if you break these tags, the whole template will fail. Do you know HTML at all or are you just editing using the graphical view?

breitman 03-06-2005 04:46 PM

I know HTML, and I use the design view too. Yes, I have noticed that sometimes, Dreamweaver adds some extra codes. What do you recommend?

breitman 03-07-2005 07:57 AM

Thanks, it's working now!


All times are GMT -8. The time now is 04:07 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.