mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
- updates for new build system - added missing files - corrections from users - revcheck comments for all files - big up to didou and nuno, brilliant work - make test: ok - make: ok
68 lines
2.1 KiB
XML
68 lines
2.1 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 1.4 Maintainer: andreas Status: ready -->
|
|
<chapter id="language.combining.modifiers">
|
|
<title>Kombinieren von Modifikatoren</title>
|
|
<para>
|
|
Sie können auf eine Variable so viele Modifikatoren anwenden wie Sie möchten.
|
|
Die Modifkatoren werden in der Reihenfolge angewandt, in der sie notiert wurden - von links nach rechts.
|
|
Kombinierte Modifikatoren müssen mit einem <literal>|</literal>-Zeichen (pipe) getrennt werden.
|
|
</para>
|
|
<example>
|
|
<title>Kombinieren von Modifikatoren</title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
index.php:
|
|
<?php
|
|
$smarty = new Smarty;
|
|
$smarty->assign('articleTitle', 'Smokers are Productive, but Death Cuts Efficiency.');
|
|
$smarty->display('index.tpl');
|
|
?>
|
|
|
|
index.tpl:
|
|
|
|
{$articleTitle}
|
|
{$articleTitle|upper|spacify}
|
|
{$articleTitle|lower|spacify|truncate}
|
|
{$articleTitle|lower|truncate:30|spacify}
|
|
{$articleTitle|lower|spacify|truncate:30:". . ."}
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
AUSGABE:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
Einem Stadtrat in Salem in Pennsylvania (USA) droht eine zweijährige Haftstrafe, da eine von ihm gehaltene Rede sechs Minuten länger dauerte, als erlaubt. Die Redezeit ist auf maximal fünf Minuten begrenzt.
|
|
|
|
EINEM STADTRAT IN SALEM IN PENNSYLVANIA (USA) DROHT EINE ZWEIJäHRIGE HAFTSTRAFE, DA EINE VON IHM GEHALTENE REDE SECHS MINUTEN LäNGER DAUERTE, ALS ERLAUBT. DIE REDEZEIT IST AUF MAXIMAL FüNF MINUTEN BEGRENZT.
|
|
|
|
e i n e m s t a d t r a t i n s a l e m i n...
|
|
|
|
e i n e m s t a d t r a t i n s a l e m i n . . .
|
|
|
|
e i n e m s t a d t r. . .]]>
|
|
</screen>
|
|
</example>
|
|
</chapter>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|