Get Smarty

Donate

Donate Bitcoin Bitcoin
Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

{ldelim},{rdelim}

{ldelim} および {rdelim} は、テンプレートのデリミタを エスケープ します。 デフォルトでは、これは { および } となります。 Javascript や CSS のようなテキストのあつまりをエスケープするためには {literal}{/literal} を使用することもできます。{$smarty.ldelim} も参照してください。

Example 7.54. {ldelim}, {rdelim}


{* これは、テンプレートからデリミタのリテラルを出力します *}

{ldelim}funcname{rdelim} is how functions look in Smarty!

   

上の例の出力


{funcname} is how functions look in Smarty!

   

Javascript を使用する別の例


<script language="JavaScript">
function foo() {ldelim}
    ... コード ...
{rdelim}
</script>

   

出力


<script language="JavaScript">
function foo() {
    .... コード ...
}
</script>

   

Example 7.55. 別の Javascript の例


<script language="JavaScript" type="text/javascript">
    function myJsFunction(){ldelim}
        alert("The server name\n{$smarty.server.SERVER_NAME}\n{$smarty.server.SERVER_ADDR}");
    {rdelim}
</script>
<a href="javascript:myJsFunction()">Click here for Server Info</a>


{literal} および Smarty の構文解析を回避 も参照してください。

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 5 plus 5? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Providers @broadbandproviders.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk