Files
smarty/docs/es/designers/language-basic-syntax/language-syntax-functions.xml

70 lines
2.1 KiB
XML
Raw Normal View History

2004-10-07 18:50:52 +00:00
<?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<6C>n
tipo de funci<63>n. Las funciones son procesadas y mostradas colocando
los <link linkend="language.syntax.attributes">atributos</link> de
la funci<63>n entre delimitadores, as<61>:
2004-10-07 18:50:52 +00:00
{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 <emphasis
role="bold">internas</emphasis> que
funcionan en Smarty, son:
<link linkend="language.function.if">{if}</link>,
<link linkend="language.function.section">{section}</link> y
<link linkend="language.function.strip">{strip}</link>.
Estas no pueden ser modificadas.
Las funciones habituales son
funciones <emphasis role="bold">adicionales</emphasis> implementadas
por <link linkend="plugins">plugins</link>. Estas si pueden
2004-10-07 18:50:52 +00:00
ser modificadas como usted quiera, o usted tambi<62>n puede
adicionar nuevas.
<link linkend="language.function.html.options">{html_options}</link> y
<link linkend="language.function.popup">{popup}</link>
2004-10-07 18:50:52 +00:00
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
-->