mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 04:11:37 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			63 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="iso-8859-1"?>
 | |
| <!-- $Revision$ -->
 | |
| <sect1 id="language.syntax.attributes">
 | |
|  <title>Attributes</title>
 | |
|  <para>
 | |
|   Most of the <link linkend="language.syntax.functions">functions</link>
 | |
|   take attributes that specify or modify
 | |
|   their behavior. Attributes to Smarty functions are much like HTML
 | |
|   attributes. Static values don't have to be enclosed in quotes, but it
 | |
|   is recommended for literal strings. Variables may also be used, and
 | |
|   should not be in quotes.
 | |
|  </para>
 | |
|  <para>
 | |
|   Some attributes require boolean values (true or false). These can be
 | |
|   specified as either unquoted <literal>true</literal>,
 | |
|   <literal>on</literal>, and <literal>yes</literal>, or
 | |
|   <literal>false</literal>, <literal>off</literal>, and
 | |
|   <literal>no</literal>.
 | |
|  </para>
 | |
|  <example>
 | |
|   <title>function attribute syntax</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
 | |
| -->
 |