Path

ez.no / ezpublish / documentation / the template language / curly bracket issues


Curly bracket issues

These documentation pages are no longer maintained. Please visit the new documentation site.

Since curly brackets are used to define eZ publish specific template code, these characters can not be used directly. For example, Javascript code can not be put directly into a template file. Code/text that uses curly brackets must be put inside a "literal" section. A literal section is bypassed by the template engine and the contents of such a section is thus outputted directly. The following example demonstrates the use of the "literal" template tag.

{literal}

<script language="Javascript">

<!--

function OpenWindow( URL, WinName, Features )

{

   //

   popup = window.open( URL, WinName, Features);

 

   //

   if( popup.opener == null)

   {

       //

       remote.opener = window;

   }

 

   // Give focus to thee newly popped up window.

   popup.focus();

}

//-->

{/literal}

Outputting curly brackets

Curly brackets are treated as block start and block end by the template parser. This means that they can not be put directly in the template code in order to produce a { or } on the web page. From inside a template code block, these characters may only be output by using the "ldelim" and "rdelim" functions.

{* Outputting the curly brackets using template functions. *}

This is the left curly bracket: {ldelim} <br />

This is the right curly bracket: {rdelim} <br />

Output:

This is the left curly bracket: {
This is the right curly bracket: }

Comments

Contents

The template language

Template code
Curly bracket issues
Comments
Variable types


Created

27/02/2004
3:23:10 pm
by Balazs Halasy

Last updated

27/02/2004
3:24:19 pm
by Balazs Halasy

Authors

Balazs Halasy



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.