literal

Summary

Instructs the parser to ignore a block of template code.

Usage

{literal}
...
{/literal}

Description

This function can be used to encapsulate foreign code (for example JavaScript) that makes use of characters that may confuse the template parser. Everything that is inside a literal block will be completely ignored by the parser.

Examples

Example 1

{literal}
<script language="JavaScript" type="text/javascript">
<!--
function foo()
{
    alert ( "Call me" );
}
//-->
</script>
{/literal}

This example demonstrates how to include a JavaScript snippet in a template using the "{literal}" and "{/literal}" notation.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.