Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 1... Zeile 1...
1
Combining Modifiers {#language.combining.modifiers}
1
# Combining Modifiers
2
===================
-
 
Zeile 3... Zeile 2...
3
 
2
 
4
You can apply any number of modifiers to a variable. They will be
3
You can apply any number of modifiers to a variable. They will be
5
applied in the order they are combined, from left to right. They must be
4
applied in the order they are combined, from left to right. They must be
Zeile -... Zeile 5...
-
 
5
separated with a `|` (pipe) character.
-
 
6
 
Zeile 6... Zeile -...
6
separated with a `|` (pipe) character.
-
 
7
 
-
 
8
 
7
```php
9
    <?php
8
<?php
10
 
-
 
Zeile 11... Zeile 9...
11
    $smarty->assign('articleTitle', 'Smokers are Productive, but Death Cuts Efficiency.');
9
 
Zeile 12... Zeile 10...
12
 
10
$smarty->assign('articleTitle', 'Smokers are Productive, but Death Cuts Efficiency.');
13
    ?>
11
```
14
 
12
 
15
where template is:
13
where template is:
16
 
14
 
17
 
15
```smarty
18
    {$articleTitle}
16
{$articleTitle}
Zeile 19... Zeile 17...
19
    {$articleTitle|upper|spacify}
17
{$articleTitle|upper|spacify}
Zeile 20... Zeile 18...
20
    {$articleTitle|lower|spacify|truncate}
18
{$articleTitle|lower|spacify|truncate}
21
    {$articleTitle|lower|truncate:30|spacify}
19
{$articleTitle|lower|truncate:30|spacify}
22
    {$articleTitle|lower|spacify|truncate:30:". . ."}
20
{$articleTitle|lower|spacify|truncate:30:". . ."}
23
 
21
```
24
      
22
      
25
 
23
 
26
The above example will output:
-
 
27
 
24
The above example will output: