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:
ほとんどの 関数 には、 それらの動作を指定したり修正するための属性があります。Smarty 関数の属性は HTML の属性にかなり近いものです。静的な値はクォートで囲む必要はありませんが、 リテラル文字列であるべきです。変数を使う場合はクォートで囲んではいけません。
いくつかの属性は、boolean 値 (TRUE
あるいは FALSE
) を必要とします。
これらの値は、クォートなしの true
、
on
、yes
あるいは
false
、off
、
no
を指定する事が出来ます。
Example 3.4. 関数の属性の構文
{include file='header.tpl'} {include file='header.tpl' attrib_name='attrib value'} {include file=$includeFile} {include file=#includeFile# title='イケてる Smarty'} {html_select_date display_days=yes} {mailto address='smarty@example.com'} <select name='company_id'> {html_options options=$companies selected=$company_id} </select>