mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34: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,26 +1,33 @@
|
|||||||
<?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 !
|
||||||
|
]]>
|
||||||
|
|
||||||
SORTIE:
|
|
||||||
|
|
||||||
{nomFonction} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Affichera :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
|
{nomFonction} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -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,15 +9,19 @@
|
|||||||
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; }
|
||||||
@@ -27,10 +31,12 @@
|
|||||||
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,6 +1,6 @@
|
|||||||
<?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">
|
||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
|
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
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