mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
Sync with en
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.14 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.15 Maintainer: gerald Status: ready -->
|
||||
<chapter id="language.modifiers">
|
||||
<title>Modificateurs de variables</title>
|
||||
<para>
|
||||
@@ -16,17 +16,25 @@
|
||||
<title>Exemple de modificateur</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* Met le titre en majuscule *}
|
||||
<h2>{$title|upper}</h2>
|
||||
{* applique un modificateur <20> une variable *}
|
||||
{$titre|upper}
|
||||
|
||||
{* Tronque le sujet <20> 40 caract<63>res, place des "..." <20> la fin *}
|
||||
Sujet: {$sujet|truncate:40:"..."}
|
||||
{* modificateur avec param<61>tres *}
|
||||
{$titre|truncate:40:"..."}
|
||||
|
||||
{* formatage en cha<EFBFBD>ne *}
|
||||
{"now"|date_format:"%Y/%m/%d"}
|
||||
{* applique un modificateur <20> un param<61>tre de fonction *}
|
||||
{html_table loop=$mavariable|upper}
|
||||
{* avec param<61>tres *}
|
||||
{html_table loop=$mavariable|truncate:40:"..."}
|
||||
|
||||
{* application d'un modificateur <20> une fonction utilisateur *}
|
||||
{mailto|upper address="me@domain.dom"}
|
||||
{* applique un modificateur <20> une chaine de caract<63>res *}
|
||||
{"foobar"|upper}
|
||||
|
||||
{* utilise date_format pour mettre en forme la date *}
|
||||
{$smarty.now|date_format:"%d/%m/%Y"}
|
||||
|
||||
{* applique un modificateur <20> une fonction utilisateur *}
|
||||
{mailto|upper address="moi@domaine.dom"}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
Reference in New Issue
Block a user