mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-04 06: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.functions">
 | 
						|
 <title>Funciones</title>
 | 
						|
 <para>
 | 
						|
  Cada etiqueta Smarty muestra una
 | 
						|
  <link linkend="language.variables">variable</link> o utiliza algún 
 | 
						|
  tipo de función. Las funciones son procesadas y mostradas colocando 
 | 
						|
  los atributos de la función entre delimitadores, así: 
 | 
						|
  {funcname attr1="val" attr2="val"}.
 | 
						|
 </para>
 | 
						|
 <example>
 | 
						|
  <title>Sintaxis de Funciones</title>
 | 
						|
  <programlisting>
 | 
						|
<![CDATA[
 | 
						|
{config_load file="colors.conf"}
 | 
						|
 | 
						|
{include file="header.tpl"}
 | 
						|
 | 
						|
{if $highlight_name}
 | 
						|
    Welcome, <font color="{#fontColor#}">{$name}!</font>
 | 
						|
{else}
 | 
						|
    Welcome, {$name}!
 | 
						|
{/if}
 | 
						|
 | 
						|
{include file="footer.tpl"}
 | 
						|
]]>
 | 
						|
  </programlisting>
 | 
						|
 </example>
 | 
						|
 <para>
 | 
						|
  Las funciones internas y las funciones habituales, ambas deben tener 
 | 
						|
  la misma sintaxis dentro del template. Las funciones internas que 
 | 
						|
  funcionan en Smarty, son: <command>if</command>,
 | 
						|
  <command>section</command> y <command>strip</command>.
 | 
						|
  Estas no pueden ser modificadas. Las funciones habituales son 
 | 
						|
  funciones adicionales implementadas por plugins. Estas si pueden
 | 
						|
  ser modificadas como usted quiera, o usted también puede 
 | 
						|
  adicionar nuevas.
 | 
						|
  <command>html_options</command> y <command>html_select_date</command>
 | 
						|
  son ejemplos de funciones habituales.
 | 
						|
 </para>
 | 
						|
</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
 | 
						|
-->
 |