added <![CDATA[ tags, synx translation informations. Designers section is now up to date.

This commit is contained in:
gerald
2004-07-04 10:02:31 +00:00
parent 70e05aaf37
commit ee46e61fc6
2 changed files with 75 additions and 51 deletions

View 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: nobody Status: partial --> <!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.config.variables"> <sect1 id="language.config.variables">
<title>Variables charg<72>es depuis des fichiers de configuration</title> <title>Variables charg<72>es depuis des fichiers de configuration</title>
<para> <para>
@@ -12,62 +12,77 @@
<example> <example>
<title>variables de fichiers de configuration</title> <title>variables de fichiers de configuration</title>
<para>
foo.conf
</para>
<programlisting> <programlisting>
foo.conf: <![CDATA[
pageTitle = "C'est le mien" pageTitle = "C'est le mien"
bodyBgColor = "#eeeeee" bodyBgColor = "#eeeeee"
tableBorderSize = "3" tableBorderSize = "3"
tableBgColor = "#bbbbbb" tableBgColor = "#bbbbbb"
rowBgColor = "#cccccc" rowBgColor = "#cccccc"
]]>
</programlisting>
<para>
index.tpl: index.tpl:
</para>
<programlisting>
<![CDATA[
{config_load file="foo.conf"} {config_load file="foo.conf"}
&lt;html&gt; <html>
&lt;title&gt;{#pageTitle#}&lt;/title&gt; <title>{#pageTitle#}</title>
&lt;body bgcolor="{#bodyBgColor#}"&gt; <body bgcolor="{#bodyBgColor#}">
&lt;table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}"&gt; <table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
&lt;tr bgcolor="{#rowBgColor#}"&gt; <tr bgcolor="{#rowBgColor#}">
&lt;td&gt;First&lt;/td&gt; <td>First</td>
&lt;td&gt;Last&lt;/td&gt; <td>Last</td>
&lt;td&gt;Address&lt;/td&gt; <td>Address</td>
&lt;/tr&gt; </tr>
&lt;/table&gt; </table>
&lt;/body&gt; </body>
&lt;/html&gt; </html>
]]>
</programlisting>
<para>
index.tpl: (alternate syntax) index.tpl: (alternate syntax)
</para>
<programlisting>
<![CDATA[
{config_load file="foo.conf"} {config_load file="foo.conf"}
&lt;html&gt; <html>
&lt;title&gt;{$smarty.config.pageTitle}&lt;/title&gt; <title>{$smarty.config.pageTitle}</title>
&lt;body bgcolor="{$smarty.config.bodyBgColor}"&gt; <body bgcolor="{$smarty.config.bodyBgColor}">
&lt;table border="{$smarty.config.tableBorderSize}" bgcolor="{$smarty.config.tableBgColor}"&gt; <table border="{$smarty.config.tableBorderSize}" bgcolor="{$smarty.config.tableBgColor}">
&lt;tr bgcolor="{$smarty.config.rowBgColor}"&gt; <tr bgcolor="{$smarty.config.rowBgColor}">
&lt;td&gt;First&lt;/td&gt; <td>First</td>
&lt;td&gt;Last&lt;/td&gt; <td>Last</td>
&lt;td&gt;Address&lt;/td&gt; <td>Address</td>
&lt;/tr&gt; </tr>
&lt;/table&gt; </table>
&lt;/body&gt; </body>
&lt;/html&gt; </html>
]]>
</programlisting>
SORTIE: (same for both examples) <para>
Ce qui donne en sortie, pour les deux exemples :
&lt;html&gt; </para>
&lt;title&gt;C'est le mien&lt;/title&gt; <screen>
&lt;body bgcolor="#eeeeee"&gt; <![CDATA[
&lt;table border="3" bgcolor="#bbbbbb"&gt; <html>
&lt;tr bgcolor="#cccccc"&gt; <title>C'est le mien</title>
&lt;td&gt;First&lt;/td&gt; <body bgcolor="#eeeeee">
&lt;td&gt;Last&lt;/td&gt; <table border="3" bgcolor="#bbbbbb">
&lt;td&gt;Address&lt;/td&gt; <tr bgcolor="#cccccc">
&lt;/tr&gt; <td>First</td>
&lt;/table&gt; <td>Last</td>
&lt;/body&gt; <td>Address</td>
&lt;/html&gt;</programlisting> </tr>
</table>
</body>
</html>
]]>
</screen>
</example> </example>
<para> <para>
Les variables de fichier de configuration ne peuvent <20>tre utilis<69>s tant Les variables de fichier de configuration ne peuvent <20>tre utilis<69>s tant

View 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: nobody Status: partial --> <!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.variables.smarty"> <sect1 id="language.variables.smarty">
<title>Variable r<>serv<72>e {$smarty}</title> <title>Variable r<>serv<72>e {$smarty}</title>
<para> <para>
@@ -18,6 +18,7 @@
<title>Afficher des variables de requ<71>te</title> <title>Afficher des variables de requ<71>te</title>
<programlisting> <programlisting>
<![CDATA[
{* Affiche la valeur de page dans l'url (GET) http://www.domain.com/index.php?page=foo *} {* Affiche la valeur de page dans l'url (GET) http://www.domain.com/index.php?page=foo *}
{$smarty.get.page} {$smarty.get.page}
@@ -37,7 +38,9 @@
{$smarty.session.id} {$smarty.session.id}
{* affiche la variable "utilisateur" du regroupement de get/post/cookies/server/env *} {* affiche la variable "utilisateur" du regroupement de get/post/cookies/server/env *}
{$smarty.request.utilisateur}</programlisting> {$smarty.request.utilisateur}
]]>
</programlisting>
</example> </example>
</sect2> </sect2>
@@ -53,8 +56,11 @@
<title>utilisation de {$smarty.now}</title> <title>utilisation de {$smarty.now}</title>
<programlisting> <programlisting>
<![CDATA[
{* utilise le modificateur de variable date_format pour afficher la date et heure *} {* utilise le modificateur de variable date_format pour afficher la date et heure *}
{$smarty.now|date_format:"%d-%m-%Y %H:%M:%S"}</programlisting> {$smarty.now|date_format:"%d-%m-%Y %H:%M:%S"}
]]>
</programlisting>
</example> </example>
</sect2> </sect2>
<sect2 id="language.variables.smarty.const"> <sect2 id="language.variables.smarty.const">
@@ -66,7 +72,10 @@
<title>Utiliser {$smarty.const}</title> <title>Utiliser {$smarty.const}</title>
<programlisting> <programlisting>
{$smarty.const._MA_CONSTANTE_}</programlisting> <![CDATA[
{$smarty.const._MA_CONSTANTE_}
]]>
</programlisting>
</example> </example>
</sect2> </sect2>