mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-12 01:49:53 +01:00
56 lines
1.7 KiB
XML
56 lines
1.7 KiB
XML
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|||
|
|
<!-- $Revision$ -->
|
|||
|
|
<sect1 id="language.syntax.functions">
|
|||
|
|
<title>Fun<EFBFBD><EFBFBD>es</title>
|
|||
|
|
<para>
|
|||
|
|
Cada tag Smarty mostra uma
|
|||
|
|
<link linkend="language.variables">vari<EFBFBD>vel</link> ou utiliza algum tipo de
|
|||
|
|
fun<75><6E>o. Fun<75><6E>es s<>o processadas e mostradas colocando-se a fun<75><6E>o e seus
|
|||
|
|
atributos entre delimitadores, assim: {funcname
|
|||
|
|
attr1="val" attr2="val"}.
|
|||
|
|
</para>
|
|||
|
|
<example>
|
|||
|
|
<title>Sintaxe de fun<75><6E>es</title>
|
|||
|
|
<programlisting>
|
|||
|
|
{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>
|
|||
|
|
Ambas as fun<75><6E>es internas e as fun<75><6E>es customizadas tem a mesma sintaxe nos
|
|||
|
|
templates. Fun<75><6E>es internas s<>o o funcionamento do Smarty,
|
|||
|
|
assim como <command>if</command>, <command>section</command> e
|
|||
|
|
<command>strip</command>. Elas n<>o podem ser modificadas. Fun<75><6E>es customizadas
|
|||
|
|
s<>o fun<75><6E>es adicionais implementadas por plugins. Elas podem ser modificadas
|
|||
|
|
como voc<6F> quiser, ou voc<6F> pode adionar novas. <command>html_options</command> e
|
|||
|
|
<command>html_select_date</command> s<>o exemplos de fun<75><6E>es customizadas.
|
|||
|
|
</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
|
|||
|
|
-->
|