Get Smarty

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

$config_overwrite

TRUE の場合、 設定ファイル から読み込んだ変数は互いに上書きされます (デフォルトは TRUE)。 FALSE の場合、変数は配列にプッシュされます。 これは各要素を複数回リストするような、 設定ファイルのデータの配列を格納したい場合に役立ちます。

Example 12.4. 設定ファイル変数の配列

この例では $config_overwrite = FALSE とし、 {cycle} でテーブルの行の色を 赤/緑/青 と切り替えています。

設定ファイル


# row colors
rowColors = #FF0000
rowColors = #00FF00
rowColors = #0000FF

    

{section} ループを使用したテンプレート


<table>
  {section name=r loop=$rows}
  <tr bgcolor="{cycle values=#rowColors#}">
    <td> ....何かの内容.... </td>
  </tr>
  {/section}
</table>

    

{config_load}get_config_vars()clear_config()config_load() および config files section も参照してください。

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 14 plus 6? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk