2004-04-13 08:46:28 +00:00
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
|
|
<!-- $Revision$ -->
|
2004-10-03 09:04:23 +00:00
|
|
|
|
<!-- EN-Revision: 1.2 Maintainer: thomasgm Status: ready -->
|
2004-04-13 08:46:28 +00:00
|
|
|
|
<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
|
2004-09-21 15:05:45 +00:00
|
|
|
|
fun<75><6E>o. Fun<75><6E>es s<>o processadas e exibidas colocando-se a fun<75><6E>o e seus
|
|
|
|
|
|
atributos entre delimitadores, exemplo: {funcname attr1="val" attr2="val"}.
|
2004-04-13 08:46:28 +00:00
|
|
|
|
</para>
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>Sintaxe de fun<75><6E>es</title>
|
|
|
|
|
|
<programlisting>
|
2004-09-21 15:05:45 +00:00
|
|
|
|
<![CDATA[
|
|
|
|
|
|
{config_load file="cores.conf"}
|
2004-04-13 08:46:28 +00:00
|
|
|
|
|
2004-09-21 15:05:45 +00:00
|
|
|
|
{include file="cabecalho.tpl"}
|
2004-04-13 08:46:28 +00:00
|
|
|
|
|
2004-09-21 15:05:45 +00:00
|
|
|
|
{if $enfase_nome}
|
2004-09-22 14:55:51 +00:00
|
|
|
|
Seja bem-vindo, <font color="{#corFonte#}">{$nome}!</font>
|
2004-04-13 08:46:28 +00:00
|
|
|
|
{else}
|
2004-09-21 15:05:45 +00:00
|
|
|
|
Seja bem-vindo, {$nome}!
|
2004-04-13 08:46:28 +00:00
|
|
|
|
{/if}
|
|
|
|
|
|
|
2004-09-21 15:05:45 +00:00
|
|
|
|
{include file="rodape.tpl"}
|
|
|
|
|
|
]]>
|
|
|
|
|
|
</programlisting>
|
2004-04-13 08:46:28 +00:00
|
|
|
|
</example>
|
|
|
|
|
|
<para>
|
2004-09-21 15:05:45 +00:00
|
|
|
|
Ambas as fun<75><6E>es internas e as fun<75><6E>es personalizadas tem a mesma sintaxe nos
|
2004-04-13 08:46:28 +00:00
|
|
|
|
templates. Fun<75><6E>es internas s<>o o funcionamento do Smarty,
|
2004-09-21 15:05:45 +00:00
|
|
|
|
tais como <command>if</command>, <command>section</command> e
|
|
|
|
|
|
<command>strip</command>. Elas n<>o podem ser modificadas. Fun<75><6E>es personalizadas
|
|
|
|
|
|
s<>o fun<75><6E>es adicionais implementadas por modo de plugins. Elas podem ser modificadas
|
2004-04-13 08:46:28 +00:00
|
|
|
|
como voc<6F> quiser, ou voc<6F> pode adionar novas. <command>html_options</command> e
|
2004-09-21 15:05:45 +00:00
|
|
|
|
<command>html_select_date</command> s<>o exemplos de fun<75><6E>es personalizadas.
|
2004-04-13 08:46:28 +00:00
|
|
|
|
</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
|
|
|
|
|
|
-->
|