Files
smarty/docs/pt_BR/designers/language-basic-syntax/language-syntax-functions.xml
nlopess f8014929e5 fix revision tags
@@arg0@
2004-10-03 09:04:23 +00:00

59 lines
1.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.2 Maintainer: thomasgm Status: ready -->
<sect1 id="language.syntax.functions">
<title>Funções</title>
<para>
Cada tag Smarty mostra uma
<link linkend="language.variables">variável</link> ou utiliza algum tipo de
função. Funções são processadas e exibidas colocando-se a função e seus
atributos entre delimitadores, exemplo: {funcname attr1="val" attr2="val"}.
</para>
<example>
<title>Sintaxe de funções</title>
<programlisting>
<![CDATA[
{config_load file="cores.conf"}
{include file="cabecalho.tpl"}
{if $enfase_nome}
Seja bem-vindo, <font color="{#corFonte#}">{$nome}!</font>
{else}
Seja bem-vindo, {$nome}!
{/if}
{include file="rodape.tpl"}
]]>
</programlisting>
</example>
<para>
Ambas as funções internas e as funções personalizadas tem a mesma sintaxe nos
templates. Funções internas são o funcionamento do Smarty,
tais como <command>if</command>, <command>section</command> e
<command>strip</command>. Elas não podem ser modificadas. Funções personalizadas
são funções adicionais implementadas por modo de plugins. Elas podem ser modificadas
como você quiser, ou você pode adionar novas. <command>html_options</command> e
<command>html_select_date</command> são exemplos de funções personalizadas.
</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
-->