Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
createTemplate()
2
 
3
returns a template object
4
 
5
Description
6
===========
7
 
8
Smarty\_Internal\_Template
9
 
10
createTemplate
11
 
12
string
13
 
14
template
15
 
16
object
17
 
18
parent
19
 
20
Smarty\_Internal\_Template
21
 
22
createTemplate
23
 
24
string
25
 
26
template
27
 
28
array
29
 
30
data
31
 
32
Smarty\_Internal\_Template
33
 
34
createTemplate
35
 
36
string
37
 
38
template
39
 
40
string
41
 
42
cache\_id
43
 
44
string
45
 
46
compile\_id
47
 
48
object
49
 
50
parent
51
 
52
Smarty\_Internal\_Template
53
 
54
createTemplate
55
 
56
string
57
 
58
template
59
 
60
string
61
 
62
cache\_id
63
 
64
string
65
 
66
compile\_id
67
 
68
array
69
 
70
data
71
 
72
This creates a template object which later can be rendered by the
73
[display](#api.display) or [fetch](#api.fetch) method. It uses the
74
following parameters:
75
 
76
-   `template` must be a valid [template resource](#resources) type and
77
    path.
78
 
79
<!-- -->
80
 
81
 
82
    <?php
83
    include('Smarty.class.php');
84
    $smarty = new Smarty;
85
 
86
    // create template object with its private variable scope
87
    $tpl = $smarty->createTemplate('index.tpl');
88
 
89
    // assign variable to template scope
90
    $tpl->assign('foo','bar');
91
 
92
    // display the template
93
    $tpl->display();
94
    ?>
95
 
96
 
97
 
98
See also [`display()`](#api.display), and
99
[`templateExists()`](#api.template.exists).