{literal}

{literal}

{literal} tags allow a block of data to be taken literally. This is typically used around javascript or stylesheet blocks where curly braces would interfere with the template delimiter syntax. Anything within {literal}{/literal} tags is not interpreted, but displayed as-is. If you need template tags embedded in your {literal} block, consider using {ldelim}{rdelim} to escape the individual delimiters instead.

Example 7-16. {literal} tags

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

See also Escaping Smarty Parsing.

© Copyright 2003-2014 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.