mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-09 00:31:45 +01:00
62 lines
1.7 KiB
XML
62 lines
1.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- $Revision$ -->
|
|
<sect1 id="language.syntax.attributes">
|
|
<title>Atribut</title>
|
|
<para>
|
|
Kebanyakan <link linkend="language.syntax.functions">fungsi</link>
|
|
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.
|
|
</para>
|
|
<para>
|
|
Beberapa atribut memerlukan nilai boolean (&true; atau &false;). Ini dapat
|
|
ditetapkan sebagai tanpa tanda kutip <literal>true</literal>,
|
|
<literal>on</literal>, dan <literal>yes</literal>, atau
|
|
<literal>false</literal>, <literal>off</literal>, dan
|
|
<literal>no</literal>.
|
|
</para>
|
|
<example>
|
|
<title>sintaks atribut fungsi</title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
{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>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</sect1>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|