Files
smarty/docs/ja/designers/language-basic-syntax/language-syntax-attributes.xml
2008-05-26 08:47:23 +00:00

63 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 2628 Maintainer: takagi Status: ready -->
<!-- CREDITS: mat-sh,daichi,joe -->
<sect1 id="language.syntax.attributes">
<title>属性</title>
<para>
ほとんどの <link linkend="language.syntax.functions">関数</link> には、
それらの動作を指定したり修正するための属性があります。Smarty 関数の属性は
HTML の属性にかなり近いものです。静的な値はクォートで囲む必要はありませんが、
リテラル文字列であるべきです。変数を使う場合はクォートで囲んではいけません。
</para>
<para>
いくつかの属性は、boolean 値 (&true; あるいは &false;) を必要とします。
これらの値は、クォートなしの <literal>true</literal>
<literal>on</literal><literal>yes</literal> あるいは
<literal>false</literal><literal>off</literal>
<literal>no</literal> を指定する事が出来ます。
</para>
<example>
<title>関数の属性の構文</title>
<programlisting>
<![CDATA[
{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>
]]>
</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
-->