What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
Table of Contents
List of Examples
php.ini ファイルにライブラリへのパスを追加する
{block} の例
{block} を前に置く例
{block} を後に置く例
{$smarty.block.child} の例
{$smarty.block.parent} の例
{for} ループ
max 属性の使用
{forelse} の実行
{foreach} ループ
key 変数の例
item と key をネストする例
index の例
iteration の例: is div by
iteration の例: is even/odd by
first プロパティの例
last プロパティの例
show プロパティの例
total プロパティの例
loop 変数の使用
index プロパティ
index、index_next
および index_prev プロパティ
iteration
first と last
loop
show プロパティ
total プロパティの例
options 属性での連想配列
values と
ouptut を個別の配列で指定したドロップダウン
extends: による継承