{ldelim},{rdelim} 定界符
{ldelim} 和 {rdelim}用于 避免解析模板定界符, 默认是 { 和 }。
同时你也可以用{literal}{/literal}来避免解析区域的字符
使用示例
{* this will print literal delimiters out of the template *}
{ldelim}funcname{rdelim} is how functions look in Sdopx!
输出:
{funcname} is how functions look in Sdopx!
使用示例2
<script language="JavaScript">
function foo() {ldelim}
... code ...
{rdelim}
</script>
输出:
<script language="JavaScript">
function foo() {
... code ...
}
</script>
使用示例3:
{* this will print literal delimiters out of the template *}
{literal left='<@' right='@>'}
<@ldelim@>funcname<@rdelim@> is how functions look in Sdopx!
{/literal}
结果输出:
<@funcname@> is how functions look in Sdopx!