Get Smarty

Donate

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:

Sites Using Smarty

Advertisement

Atribut

Kebanyakan fungsi memerlukan atribut yang menetapkan atau mengubah perilakunya. Atribut bagi fungsi Smarty lebih mirip atribut HTML. Nilai statis tidak perlu ditutup dengan tanda kutip, tapi direkomendasikan untuk string literal. Variabel bisa juga dipakai, dan tidak boleh dalam tanda kutip.

Beberapa atribut memerlukan nilai boolean (TRUE atau FALSE). Ini dapat ditetapkan sebagai tanpa tanda kutip true, on, dan yes, atau false, off, dan no.

Teladan 3-4. sintaks atribut fungsi

{include file='header.tpl'}

{include file='header.tpl' attrib_name='attrib value'}

{include file=$includeFile}

{include file=#includeFile# title='Smarty is cool'}

{html_select_date display_days=yes}

{mailto address='smarty@example.com'}

<select name='company_id'>
  {html_options options=$companies selected=$company_id}
</select>
Comments
No comments for this page.

Advertisement

Sponsors [info]

Sponsors