{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!
上一篇:{block}模板区块
下一篇:{literal}原样输出
Copyright © 2021 海南的叶子 All Rights Reserved 琼ICP备2021000725号

琼公网安备 46900702000037号