Mercurial > pub > Impl
comparison Lib/IMPL/Web/View/TTDocument.pm @ 343:9bdccdf1f50b
Added a templates context
author | cin |
---|---|
date | Fri, 13 Sep 2013 12:53:15 +0400 |
parents | ec4ec1f056fe |
children | f1d67615a5b1 |
comparison
equal
deleted
inserted
replaced
342:1090c1dd7429 | 343:9bdccdf1f50b |
---|---|
74 my $this = shift; | 74 my $this = shift; |
75 | 75 |
76 $this->registry->Dispose() if $this->registry; | 76 $this->registry->Dispose() if $this->registry; |
77 } | 77 } |
78 | 78 |
79 sub _clone_context { | |
80 my $args = { %{shift || {}} }; | |
81 delete $args->{CONFIG}; | |
82 | |
83 return Template::Context->new($args); | |
84 } | |
85 | |
86 1; | 79 1; |
87 | 80 |
88 __END__ | 81 __END__ |
89 | 82 |
90 =pod | 83 =pod |
100 | 93 |
101 =end code | 94 =end code |
102 | 95 |
103 =head1 DESCRIPTION | 96 =head1 DESCRIPTION |
104 | 97 |
98 Позволяет строить представления при помощи Template Toolkit, при этом расширяет | |
99 шаблоны до элементов управления, чтобы была возмлжность реализации функционала | |
100 средствами C<Perl>. | |
101 | |
102 Структура представления. | |
103 | |
104 =begin text | |
105 | |
106 + view | |
107 |- document.tt | |
108 |-+items | |
109 | |- title.tt | |
110 | |- item.tt | |
111 | | |
112 |-+layouts | |
113 |- | |
114 | |
115 =end text | |
116 | |
117 =begin text | |
118 | |
119 | |
120 | |
121 =end text | |
122 | |
105 | 123 |
106 =over | 124 =over |
107 | 125 |
108 | 126 |
109 =cut | 127 =cut |