Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

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.

Balazs Halasy (06/02/2004 1:19 pm)

Balazs Halasy (28/04/2005 1:59 pm)


Comments

There are no comments.