mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
added <![CDATA[ tags, synx translation informations. Designers section is now up to date.
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.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"}
|
||||||
<html>
|
<html>
|
||||||
<title>{#pageTitle#}</title>
|
<title>{#pageTitle#}</title>
|
||||||
<body bgcolor="{#bodyBgColor#}">
|
<body bgcolor="{#bodyBgColor#}">
|
||||||
<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
|
<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
|
||||||
<tr bgcolor="{#rowBgColor#}">
|
<tr bgcolor="{#rowBgColor#}">
|
||||||
<td>First</td>
|
<td>First</td>
|
||||||
<td>Last</td>
|
<td>Last</td>
|
||||||
<td>Address</td>
|
<td>Address</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
index.tpl: (alternate syntax)
|
index.tpl: (alternate syntax)
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{config_load file="foo.conf"}
|
{config_load file="foo.conf"}
|
||||||
<html>
|
<html>
|
||||||
<title>{$smarty.config.pageTitle}</title>
|
<title>{$smarty.config.pageTitle}</title>
|
||||||
<body bgcolor="{$smarty.config.bodyBgColor}">
|
<body bgcolor="{$smarty.config.bodyBgColor}">
|
||||||
<table border="{$smarty.config.tableBorderSize}" bgcolor="{$smarty.config.tableBgColor}">
|
<table border="{$smarty.config.tableBorderSize}" bgcolor="{$smarty.config.tableBgColor}">
|
||||||
<tr bgcolor="{$smarty.config.rowBgColor}">
|
<tr bgcolor="{$smarty.config.rowBgColor}">
|
||||||
<td>First</td>
|
<td>First</td>
|
||||||
<td>Last</td>
|
<td>Last</td>
|
||||||
<td>Address</td>
|
<td>Address</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
SORTIE: (same for both examples)
|
<para>
|
||||||
|
Ce qui donne en sortie, pour les deux exemples :
|
||||||
<html>
|
</para>
|
||||||
<title>C'est le mien</title>
|
<screen>
|
||||||
<body bgcolor="#eeeeee">
|
<![CDATA[
|
||||||
<table border="3" bgcolor="#bbbbbb">
|
<html>
|
||||||
<tr bgcolor="#cccccc">
|
<title>C'est le mien</title>
|
||||||
<td>First</td>
|
<body bgcolor="#eeeeee">
|
||||||
<td>Last</td>
|
<table border="3" bgcolor="#bbbbbb">
|
||||||
<td>Address</td>
|
<tr bgcolor="#cccccc">
|
||||||
</tr>
|
<td>First</td>
|
||||||
</table>
|
<td>Last</td>
|
||||||
</body>
|
<td>Address</td>
|
||||||
</html></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
|
||||||
|
@@ -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>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user