Files
smarty/docs/es/designers/language-combining-modifiers.xml
2008-12-23 20:32:55 +00:00

68 lines
1.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision$ -->
<chapter id="language.combining.modifiers">
<title>Combinando Modificadores</title>
<para>
Usted puede aplicar cualquier cantidad de modificadores para una variable.
Estos seran aplicados en el orden en el que fueron combinados, de izquierda
a derecha. Estos deben ser separados con el carácter <literal>|</literal>(pipe).
</para>
<example>
<title>Combinando Modificadores</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->assign('articleTitle', 'Smokers are Productive, but Death Cuts Efficiency.');
?>
]]>
</programlisting>
<para>
Donde el template es:
</para>
<programlisting>
<![CDATA[
{$articleTitle}
{$articleTitle|upper|spacify}
{$articleTitle|lower|spacify|truncate}
{$articleTitle|lower|truncate:30|spacify}
{$articleTitle|lower|spacify|truncate:30:". . ."}
]]>
</programlisting>
<para>
La salida del ejemplode arriba:
</para>
<screen>
<![CDATA[
Smokers are Productive, but Death Cuts Efficiency.
S M O K E R S A R ....snip.... H C U T S E F F I C I E N C Y .
s m o k e r s a r ....snip.... b u t d e a t h c u t s...
s m o k e r s a r e p r o d u c t i v e , b u t . . .
s m o k e r s a r e p. . .
]]>
</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
-->