Thursday 30 January 2003 9:44:20 am
If you are using javascript functions or inline style-declarations in your page layout templates, you will have faced the problem of how to escape the character "{", so that the ezp template parser won't destroy e.g. the opening brackets of your javascript functions. The recommended way to accomplish this is to use the "{literal}" and "{/literal}" operators. However, these operators are buggy in ezp3-rc1. Another way that does the job without using "{literal}" is using "{ldelim}" and "{rdelim}" where you want to get "{" and "}" in your template output. "{ldelim}" and "{rdelim}" are internal functions of the ezp template parser. These functions let the parser print out just the parser-tags it uses. There is one little caveat to keep in mind when you use the "{ldelim}" and "{rdelim}": If the ezp-devs should actually decide to use another standard tag instead of "{" and "}" for their template parser, you will have to change your own templates, too, since "{ldelim}" and "{rdelim}" will always print out the parser tag in use, and if this tag should be changed to say "{#", your javascript-functions will also get an "{#" as opening bracket. However, this seems not to be a serious danger for template designers, since most of you are probably using an editor tool capable of replacing text chunks as needed. So if some day the "{ldelim}" and "{rdelim}" are no longer appropriate, we may easily change them to whatever may be appropriate then.
|