Jump to content

embedded CSS Tags in Smarty Template throws syntax error


csplrj

Recommended Posts

I have embedded CSS Tags in my template file and Smarty throws error saying

 

Fatal error: Smarty error: [in register.tpl line 7]: syntax error: unrecognized tag: background-color: #660000; (Smarty_Compiler.class.php, line 446) in \libs\Smarty.class.php on line 1095

 

 

I think this happens due to .body{ the opening bracket how to avoid this?

 

Thanks in advance

 

CSJakharia

 

<style type="text/css"><!--/*
body {
background-color: #660000;
}
.style29 {font-size: 12px}
.style37 {color: #660000; font-weight: bold; font-style: italic; }
.style39 {font-size: 12px; color: #666666; }
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #339966;
}
a:active {
text-decoration: none;
color: #000000;
}
.style11 {font-family: "Times New Roman", Times, serif; font-size: 12px; }
.style28 {font-size: 10px;
color: #999999;
}
.style32 {color: #FFFFFF}
.style47 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;
}
body,td,th {
font-family: Georgia, Times New Roman, Times, serif;
font-size: 12px;
}
.style48 {
color: #FF3300;
font-style: italic;
}
.style49 {font-size: 12px; font-style: italic; color: #FF0000;}
*/--></style>

Thanks but I finally got the answer

 

We should use

 

{literal}
<script type="text/javascript">
<!--
  function isblank(field) {
    if (field.value == '')
      { return false; }
    else
      {
      document.loginform.submit();
      return true;
    }
  }
// -->
</script>
{/literal}

 

The link from where I got

http://smarty.php.net/manual/en/language.function.literal.php

 

Bye for now

 

CSJakharia

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.