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

59 lines
1.7 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="language.syntax.functions">
<title>Funzioni</title>
<para>
Ogni tag di Smarty pu<70> stampare una <link linkend="language.variables">variable</link>
o chiamare una qualche funzione. Le funzioni vengono richiamate richiudendo
la funzione e i suoi attributi fra i delimitatori, cos<6F>: {nomefunzione
attr1="val" attr2="val"}.
</para>
<example>
<title>sintassi delle funzioni</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>
Sia le funzioni incorporate che le funzioni utente hanno la stessa
sintassi nel template. Le funzioni incorporate sono il cuore pulsante
di Smarty, ad esempio <command>if</command>, <command>section</command> e
<command>strip</command>. Non possono essere modificate. Le funzioni
utente sono funzioni addizionali sviluppate attraverso i plugin. Potete
modificarle a piacere, e potete crearne di nuove. <command>html_options</command>
e <command>html_select_date</command> sono esempi di funzioni utente.
</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
-->