ez.no / ezpublish / documentation / the template language / 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}
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