Personal tools
Views

FAQ/Javascript and Smarty

From CMSMS

This page in: English - Deutsch - Français - Svenska - Русский - Norsk - Polski - Nederlands - Español - Lietuvių

Using {} characters in your pages

{} characters are special in Smarty (the template system that CMSMS uses). Smarty recognizes several types of tags, some of which can be within JavaScript or CSS code. Since you do not want Smarty to try to parse the JavaScript or CSS as Smarty template code, you need to surround the offending code in {literal} {/literal} tags.

Just put {literal}{/literal} tags around it like this:

{literal}
{} {These now work.}
{/literal}

Another example using Javascript or CSS:

{literal}
<script language="JavaScript" type="text/javascript">
// code here
</script>

<style type="text/css">
/* css here */
</style>
{/literal}

[More info]


This page in: English - Deutsch - Français - Svenska - Русский - Norsk - Polski - Nederlands - Español - Lietuvių