mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
sync with EN
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.syntax.quotes">
|
<sect1 id="language.syntax.quotes">
|
||||||
<title>Variables ins<6E>r<EFBFBD>es dans des cha<68>nes de caract<63>res</title>
|
<title>Variables ins<6E>r<EFBFBD>es dans des cha<68>nes de caract<63>res</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -8,7 +8,9 @@
|
|||||||
cha<68>nes entre guillemets, du moment que leur nom est exclusivement compos<6F>
|
cha<68>nes entre guillemets, du moment que leur nom est exclusivement compos<6F>
|
||||||
de chiffres, lettres, underscores et crochets. Si le nom de la variable
|
de chiffres, lettres, underscores et crochets. Si le nom de la variable
|
||||||
contient tout autre caract<63>re (point, r<>f<EFBFBD>rence <20> un objet, etc.)
|
contient tout autre caract<63>re (point, r<>f<EFBFBD>rence <20> un objet, etc.)
|
||||||
la variable doit <20>tre entour<75>e d'apostrophes inverses (`).
|
la variable doit <20>tre entour<75>e d'apostrophes inverses (`). Vous ne pouvez jamais
|
||||||
|
ins<6E>rer de modifieurs, ils doivent toujours <20>tre appliquer <20> l'ext<78>rieur des
|
||||||
|
guillemets.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>Syntaxe d'insertion de variables dans des cha<68>nes</title>
|
<title>Syntaxe d'insertion de variables dans des cha<68>nes</title>
|
||||||
@@ -21,6 +23,7 @@ EXEMPLE DE SYNTAXE:
|
|||||||
{func var="test $foo[bar] test"} <-- comprends $foo[bar]
|
{func var="test $foo[bar] test"} <-- comprends $foo[bar]
|
||||||
{func var="test $foo.bar test"} <-- comprends $foo (not $foo.bar)
|
{func var="test $foo.bar test"} <-- comprends $foo (not $foo.bar)
|
||||||
{func var="test `$foo.bar` test"} <-- comprends $foo.bar
|
{func var="test `$foo.bar` test"} <-- comprends $foo.bar
|
||||||
|
{func var="test `$foo.bar` test"|escape} <-- modifieurs <20> l'ext<78>rieur des guillemets !
|
||||||
|
|
||||||
EXEMPLE PRATIQUE:
|
EXEMPLE PRATIQUE:
|
||||||
{include file="subdir/$tpl_name.tpl"} <-- remplace $tpl_name avec la valeur
|
{include file="subdir/$tpl_name.tpl"} <-- remplace $tpl_name avec la valeur
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.function.include">
|
<sect1 id="language.function.include">
|
||||||
<title>include</title>
|
<title>include</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
{* Le corps du template vient ici *}
|
{* Le corps du template vient ici *}
|
||||||
|
|
||||||
{include file="footer.tpl" logo="http://mon.domaine.com/logo.gif"}</programlisting>
|
{include file="footer.tpl" logo="http://mon.example.com/logo.gif"}</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
Utilisez la syntaxe <link
|
Utilisez la syntaxe <link
|
||||||
|
@@ -1,28 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.function.ldelim">
|
<sect1 id="language.function.ldelim">
|
||||||
<title>ldelim,rdelim</title>
|
<title>ldelim,rdelim</title>
|
||||||
<para>
|
<para>
|
||||||
ldelim et rdelim sont utilis<69>s pour afficher les d<>limiteurs en tant
|
ldelim et rdelim sont utilis<69>s pour afficher les d<>limiteurs en tant
|
||||||
que tels, dans notre cas "{" ou "}". Le moteur de template tentera
|
que tels, dans notre cas, "{" ou "}". Vous pouvez toujours utiliser <link
|
||||||
toujours d'interpr<70>ter le contenu entre les d<>limiteurs, c'est donc
|
linkend="language.function.literal">{literal}{/literal}</link> pour <20>chapper
|
||||||
une fa<66>on d'afficher ces derniers sans interf<72>rer avec Smarty.
|
des blocks de texte.
|
||||||
|
Voir aussi <link linkend="language.variables.smarty.ldelim">{$smarty.ldelim}</link>
|
||||||
|
et <link linkend="language.variables.smarty.rdelim">{$smarty.rdelim}</link>.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>ldelim, rdelim</title>
|
<title>ldelim, rdelim</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{* Affiche les d<>limiteurs de template *}
|
{* Affiche les d<>limiteurs de template *}
|
||||||
|
|
||||||
{ldelim}nomFonction{rdelim} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
{ldelim}nomFonction{rdelim} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
SORTIE:
|
<para>
|
||||||
|
Affichera :
|
||||||
{nomFonction} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
</para>
|
||||||
</programlisting>
|
<screen>
|
||||||
</example>
|
<![CDATA[
|
||||||
</sect1>
|
{nomFonction} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
|
</example>
|
||||||
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.function.literal">
|
<sect1 id="language.function.literal">
|
||||||
<title>literal</title>
|
<title>literal</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -9,28 +9,34 @@
|
|||||||
de l'emplois d'<27>l<EFBFBD>ments tels que javascript, acolades et autres
|
de l'emplois d'<27>l<EFBFBD>ments tels que javascript, acolades et autres
|
||||||
qui peuvent confondre le moteur de template. Tout le contenu situ<74>
|
qui peuvent confondre le moteur de template. Tout le contenu situ<74>
|
||||||
entre les balises {literal}{/literal} ne sera pas interpr<70>t<EFBFBD>, et
|
entre les balises {literal}{/literal} ne sera pas interpr<70>t<EFBFBD>, et
|
||||||
affich<63> comme du contenu statique.
|
affich<63> comme du contenu statique. Si vous voulez inclure des tags de template
|
||||||
|
dans votre block lit<69>ral, utilisez plut<75>t <link
|
||||||
|
linkend="language.function.ldelim">{ldelim}{rdelim}</link> pour <20>chapper
|
||||||
|
les d<>limiteurs individuels.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>balises literal</title>
|
<title>balises literal</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{literal}
|
{literal}
|
||||||
<script language=javascript>
|
<script language=javascript>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
function isblank(field) {
|
function isblank(field) {
|
||||||
if (field.value == '')
|
if (field.value == '')
|
||||||
{ return false; }
|
{ return false; }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
document.loginform.submit();
|
document.loginform.submit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// -->
|
// -->
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{/literal}</programlisting>
|
{/literal}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.function.section">
|
<sect1 id="language.function.section">
|
||||||
<title>section,sectionelse</title>
|
<title>section, sectionelse</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -29,12 +29,10 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>loop</entry>
|
<entry>loop</entry>
|
||||||
<entry>[$nom_variable]</entry>
|
<entry>mixed</entry>
|
||||||
<entry>Oui</entry>
|
<entry>Oui</entry>
|
||||||
<entry><emphasis>n/a</emphasis></entry>
|
<entry><emphasis>n/a</emphasis></entry>
|
||||||
<entry>le nom de la variable qui d<>termine le nombre de
|
<entry>valeur qui d<>termine le nombre de fois que la boucle sera ex<65>cut<75>e.</entry>
|
||||||
fois que la boucle sera ex<65>cut<75>e.
|
|
||||||
</entry>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>start</entry>
|
<entry>start</entry>
|
||||||
@@ -164,13 +162,13 @@ addresse: 5605 apple st<br>
|
|||||||
$type_contact[client] est un tableau de type de contact pour le client
|
$type_contact[client] est un tableau de type de contact pour le client
|
||||||
courant. *}
|
courant. *}
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
id: {$idClient[client]}<br>
|
id: {$idClient[client]}<br>
|
||||||
nom: {$nom[client]}<br>
|
nom: {$nom[client]}<br>
|
||||||
addresse: {$addresse[client]}<br>
|
addresse: {$addresse[client]}<br>
|
||||||
{section name=contact loop=$type_contact[client]}
|
{section name=contact loop=$type_contact[client]}
|
||||||
{$type_contact[client][contact]}: {$info_contact[client][contact]}<br>
|
{$type_contact[client][contact]}: {$info_contact[client][contact]}<br>
|
||||||
{/section}
|
{/section}
|
||||||
<p>
|
<p>
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
@@ -181,21 +179,21 @@ nom: John Smith<br>
|
|||||||
addresse: 253 N 45th<br>
|
addresse: 253 N 45th<br>
|
||||||
telephone: 555-555-5555<br>
|
telephone: 555-555-5555<br>
|
||||||
telephone portable: 555-555-5555<br>
|
telephone portable: 555-555-5555<br>
|
||||||
e-mail: john@mydomain.com<br>
|
e-mail: john@myexample.com<br>
|
||||||
<p>
|
<p>
|
||||||
id: 1001<br>
|
id: 1001<br>
|
||||||
nom: Jack Jones<br>
|
nom: Jack Jones<br>
|
||||||
addresse: 417 Mulberry ln<br>
|
addresse: 417 Mulberry ln<br>
|
||||||
telephone: 555-555-5555<br>
|
telephone: 555-555-5555<br>
|
||||||
telephone portable: 555-555-5555<br>
|
telephone portable: 555-555-5555<br>
|
||||||
e-mail: jack@mydomain.com<br>
|
e-mail: jack@myexample.com<br>
|
||||||
<p>
|
<p>
|
||||||
id: 1002<br>
|
id: 1002<br>
|
||||||
nom: Jane Munson<br>
|
nom: Jane Munson<br>
|
||||||
addresse: 5605 apple st<br>
|
addresse: 5605 apple st<br>
|
||||||
telephone: 555-555-5555<br>
|
telephone: 555-555-5555<br>
|
||||||
telephone portable: 555-555-5555<br>
|
telephone portable: 555-555-5555<br>
|
||||||
e-mail: jane@mydomain.com<br>
|
e-mail: jane@myexample.com<br>
|
||||||
<p></programlisting>
|
<p></programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
@@ -204,10 +202,10 @@ e-mail: jane@mydomain.com<br>
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
{* Exemple d'affichage d'un tableau associatif dans une section *}
|
{* Exemple d'affichage d'un tableau associatif dans une section *}
|
||||||
{section name=client loop=$contacts}
|
{section name=client loop=$contacts}
|
||||||
nom: {$contacts[client].name}<br>
|
nom: {$contacts[client].name}<br>
|
||||||
telephone: {$contacts[client].home}<br>
|
telephone: {$contacts[client].home}<br>
|
||||||
portable: {$contacts[client].cell}<br>
|
portable: {$contacts[client].cell}<br>
|
||||||
e-mail: {$contacts[client].email}<p>
|
e-mail: {$contacts[client].email}<p>
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
@@ -216,15 +214,15 @@ SORTIE:
|
|||||||
nom: John Smith<br>
|
nom: John Smith<br>
|
||||||
telephone: 555-555-5555<br>
|
telephone: 555-555-5555<br>
|
||||||
portable: 555-555-5555<br>
|
portable: 555-555-5555<br>
|
||||||
e-mail: john@mydomain.com<p>
|
e-mail: john@myexample.com<p>
|
||||||
nom: Jack Jones<br>
|
nom: Jack Jones<br>
|
||||||
telephone: 555-555-5555<br>
|
telephone: 555-555-5555<br>
|
||||||
portable: 555-555-5555<br>
|
portable: 555-555-5555<br>
|
||||||
e-mail: jack@mydomain.com<p>
|
e-mail: jack@myexample.com<p>
|
||||||
nom: Jane Munson<br>
|
nom: Jane Munson<br>
|
||||||
telephone: 555-555-5555<br>
|
telephone: 555-555-5555<br>
|
||||||
portable: 555-555-5555<br>
|
portable: 555-555-5555<br>
|
||||||
e-mail: jane@mydomain.com<p></programlisting>
|
e-mail: jane@myexample.com<p></programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
|
|
||||||
@@ -234,9 +232,9 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
{* sectionelse est ex<65>cut<75> s'il n'existe aucune valeur dans idClient *}
|
{* sectionelse est ex<65>cut<75> s'il n'existe aucune valeur dans idClient *}
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
id: {$idClient[client]}<br>
|
id: {$idClient[client]}<br>
|
||||||
{sectionelse}
|
{sectionelse}
|
||||||
Aucune valeur dans $idClient.
|
Aucune valeur dans $idClient.
|
||||||
{/section}</programlisting>
|
{/section}</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
@@ -268,16 +266,16 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>propri<EFBFBD>t<EFBFBD> de section index</title>
|
<title>propri<EFBFBD>t<EFBFBD> de section index</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
0 id: 1000<br>
|
0 id: 1000<br>
|
||||||
1 id: 1001<br>
|
1 id: 1001<br>
|
||||||
2 id: 1002<br>
|
2 id: 1002<br>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -290,23 +288,23 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>propri<EFBFBD>t<EFBFBD> de section index_prev</title>
|
<title>propri<EFBFBD>t<EFBFBD> de section index_prev</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
||||||
{* Pour votre information, $idClient[client.index] and $idClient[client] sont identiques *}
|
{* Pour votre information, $idClient[client.index] and $idClient[client] sont identiques *}
|
||||||
{if $idClient[client.index_prev] ne $idClient[client.index]}
|
{if $idClient[client.index_prev] ne $idClient[client.index]}
|
||||||
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
||||||
{/if}
|
{/if}
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
0 id: 1000<br>
|
0 id: 1000<br>
|
||||||
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
||||||
1 id: 1001<br>
|
1 id: 1001<br>
|
||||||
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
||||||
2 id: 1002<br>
|
2 id: 1002<br>
|
||||||
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
L'id du client <20> <20>t<EFBFBD> modifi<66><br>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -320,23 +318,23 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>propri<EFBFBD>t<EFBFBD> de section index_next</title>
|
<title>propri<EFBFBD>t<EFBFBD> de section index_next</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
||||||
{* Pour votre information, $idClient[client.index] and $idClient[client] sont identiques *}
|
{* Pour votre information, $idClient[client.index] and $idClient[client] sont identiques *}
|
||||||
{if $idClient[client.index_next] ne $idClient[client.index]}
|
{if $idClient[client.index_next] ne $idClient[client.index]}
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
{/if}
|
{/if}
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
0 id: 1000<br>
|
0 id: 1000<br>
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
1 id: 1001<br>
|
1 id: 1001<br>
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
2 id: 1002<br>
|
2 id: 1002<br>
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -354,27 +352,27 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>propri<EFBFBD>t<EFBFBD> iteration de section</title>
|
<title>propri<EFBFBD>t<EFBFBD> iteration de section</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient start=5 step=2}
|
{section name=client loop=$idClient start=5 step=2}
|
||||||
Iteration courante: {$smarty.section.client.iteration}<br>
|
Iteration courante: {$smarty.section.client.iteration}<br>
|
||||||
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
||||||
{* Pour votre information, $idClient[client.index] and $idClient[client] sont identiques *}
|
{* Pour votre information, $idClient[client.index] and $idClient[client] sont identiques *}
|
||||||
{if $idCLient[client.index_next] ne $idClient[client.index]}
|
{if $idCLient[client.index_next] ne $idClient[client.index]}
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
{/if}
|
{/if}
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
Iteration courante: 1
|
Iteration courante: 1
|
||||||
5 id: 1000<br>
|
5 id: 1000<br>
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
Iteration courante: 2
|
Iteration courante: 2
|
||||||
7 id: 1001<br>
|
7 id: 1001<br>
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
Iteration courante: 3
|
Iteration courante: 3
|
||||||
9 id: 1002<br>
|
9 id: 1002<br>
|
||||||
L'id du client va changer<br>
|
L'id du client va changer<br>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -386,27 +384,27 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>propri<EFBFBD>t<EFBFBD> first de la section</title>
|
<title>propri<EFBFBD>t<EFBFBD> first de la section</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
{if $smarty.section.client.first}
|
{if $smarty.section.client.first}
|
||||||
<table>
|
<table>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<tr><td>{$smarty.section.client.index} id:
|
<tr><td>{$smarty.section.client.index} id:
|
||||||
{$idClient[client]}</td></tr>
|
{$idClient[client]}</td></tr>
|
||||||
|
|
||||||
{if $smarty.section.client.last}
|
{if $smarty.section.client.last}
|
||||||
</table>
|
</table>
|
||||||
{/if}
|
{/if}
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr><td>0 id: 1000</td></tr>
|
<tr><td>0 id: 1000</td></tr>
|
||||||
<tr><td>1 id: 1001</td></tr>
|
<tr><td>1 id: 1001</td></tr>
|
||||||
<tr><td>2 id: 1002</td></tr>
|
<tr><td>2 id: 1002</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -418,27 +416,27 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>Propri<EFBFBD>t<EFBFBD> last de section</title>
|
<title>Propri<EFBFBD>t<EFBFBD> last de section</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
{if $smarty.section.client.first}
|
{if $smarty.section.client.first}
|
||||||
<table>
|
<table>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<tr><td>{$smarty.section.client.index} id:
|
<tr><td>{$smarty.section.client.index} id:
|
||||||
{$idClient[client]}</td></tr>
|
{$idClient[client]}</td></tr>
|
||||||
|
|
||||||
{if $smarty.section.client.last}
|
{if $smarty.section.client.last}
|
||||||
</table>
|
</table>
|
||||||
{/if}
|
{/if}
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr><td>0 id: 1000</td></tr>
|
<tr><td>0 id: 1000</td></tr>
|
||||||
<tr><td>1 id: 1001</td></tr>
|
<tr><td>1 id: 1001</td></tr>
|
||||||
<tr><td>2 id: 1002</td></tr>
|
<tr><td>2 id: 1002</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -452,16 +450,16 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>propri<EFBFBD>t<EFBFBD> rownum de section</title>
|
<title>propri<EFBFBD>t<EFBFBD> rownum de section</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
{$smarty.section.client.rownum} id: {$idClient[client]}<br>
|
{$smarty.section.client.rownum} id: {$idClient[client]}<br>
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
1 id: 1000<br>
|
1 id: 1000<br>
|
||||||
2 id: 1001<br>
|
2 id: 1001<br>
|
||||||
3 id: 1002<br>
|
3 id: 1002<br>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -474,19 +472,19 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>Propri<EFBFBD>t<EFBFBD> de section index</title>
|
<title>Propri<EFBFBD>t<EFBFBD> de section index</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient}
|
{section name=client loop=$idClient}
|
||||||
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
Il y eu {$smarty.section.client.loop} clients d'affich<63>s.
|
Il y eu {$smarty.section.client.loop} clients d'affich<63>s.
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
0 id: 1000<br>
|
0 id: 1000<br>
|
||||||
1 id: 1001<br>
|
1 id: 1001<br>
|
||||||
2 id: 1002<br>
|
2 id: 1002<br>
|
||||||
|
|
||||||
il y eu 3 clients d'affich<63>s.
|
il y eu 3 clients d'affich<63>s.
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -501,26 +499,26 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>section, attribut show</title>
|
<title>section, attribut show</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{* $show_client_info a pu <20>tre pass<73> par le script PHP,
|
{* $show_client_info a pu <20>tre pass<73> par le script PHP,
|
||||||
pour d<>terminer si oui ou non on souhaite afficher la section *}
|
pour d<>terminer si oui ou non on souhaite afficher la section *}
|
||||||
{section name=client loop=$idClient show=$show_client_info}
|
{section name=client loop=$idClient show=$show_client_info}
|
||||||
{$smarty.section.client.rownum} id: {$idClient[client]}<br>
|
{$smarty.section.client.rownum} id: {$idClient[client]}<br>
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
{if $smarty.section.client.show}
|
{if $smarty.section.client.show}
|
||||||
la section <20> <20>t<EFBFBD> affich<63>e.
|
la section <20> <20>t<EFBFBD> affich<63>e.
|
||||||
{else}
|
{else}
|
||||||
la section n'a pas <20>t<EFBFBD> affich<63>e.
|
la section n'a pas <20>t<EFBFBD> affich<63>e.
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
1 id: 1000<br>
|
1 id: 1000<br>
|
||||||
2 id: 1001<br>
|
2 id: 1001<br>
|
||||||
3 id: 1002<br>
|
3 id: 1002<br>
|
||||||
|
|
||||||
la section <20> <20>t<EFBFBD> affich<63>e.
|
la section <20> <20>t<EFBFBD> affich<63>e.
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
@@ -533,19 +531,19 @@ e-mail: jane@mydomain.com<p></programlisting>
|
|||||||
<example>
|
<example>
|
||||||
<title>section, propri<72>t<EFBFBD> total</title>
|
<title>section, propri<72>t<EFBFBD> total</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{section name=client loop=$idClient step=2}
|
{section name=client loop=$idClient step=2}
|
||||||
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
{$smarty.section.client.index} id: {$idClient[client]}<br>
|
||||||
{/section}
|
{/section}
|
||||||
|
|
||||||
Il y eu {$smarty.section.client.total} clients affich<63>s.
|
Il y eu {$smarty.section.client.total} clients affich<63>s.
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
0 id: 1000<br>
|
0 id: 1000<br>
|
||||||
2 id: 1001<br>
|
2 id: 1001<br>
|
||||||
4 id: 1002<br>
|
4 id: 1002<br>
|
||||||
|
|
||||||
Il y eu 3 clients affich<63>s.
|
Il y eu 3 clients affich<63>s.
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerlad Status: ready -->
|
<!-- EN-Revision: 1.3 Maintainer: gerlad Status: ready -->
|
||||||
<sect1 id="language.function.strip">
|
<sect1 id="language.function.strip">
|
||||||
<title>strip</title>
|
<title>strip</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -32,20 +32,20 @@
|
|||||||
{strip}
|
{strip}
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<table border=0>
|
<table border=0>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<A HREF="{$url}">
|
<A HREF="{$url}">
|
||||||
<font color="red">Un test</font>
|
<font color="red">Un test</font>
|
||||||
</A>
|
</A>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{/strip}
|
{/strip}
|
||||||
|
|
||||||
|
|
||||||
SORTIE:
|
SORTIE:
|
||||||
|
|
||||||
<table border=0><tr><td><A HREF="http://mon.domaine.com"><font color="red">Un test</font></A></td></tr></table>
|
<table border=0><tr><td><A HREF="http://mon.example.com"><font color="red">Un test</font></A></td></tr></table>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
Reference in New Issue
Block a user