4
|
1 [%
|
|
2 document.css = [];
|
|
3 document.scripts = [];
|
|
4 document.meta = [];
|
|
5 document.class = [];
|
|
6 %]
|
|
7 [% BLOCK PAGE_LAYOUT %]
|
|
8 <!DOCTYPE html>
|
|
9 <html>
|
|
10 <head>
|
|
11 <title>[% site.name ? "$site.name - $document.title" : document.title %]</title>
|
6
|
12 [% FOREACH item IN document.css %]
|
|
13 <link rel="stylesheet" href="$item" type="text/css">
|
4
|
14 [% END %]
|
|
15 [% FOREACH item IN document.scripts +%]
|
|
16 <script type="[% item.type || 'text/javascript' %]"[% ' href="' _ item.href _ '"' IF item.href %]>
|
|
17 [% item.text %]
|
|
18 </script>
|
|
19 [% END %]
|
|
20 [% FOREACH item IN document.meta +%]
|
|
21 <meta [% FOREACH pair IN item %]$pair.key = "[% pair.value | html_entity %]" [% END %]>
|
|
22 [% END +%]
|
|
23 </head>
|
|
24 <body[% ' class="' _ document.class.join(' ') _ '"' IF document.class.size %]>
|
|
25 $content
|
|
26 </body>
|
|
27 </html>
|
|
28 [% END %]
|
7
|
29 [% BLOCK CONTENT_LAYOUT;
|
4
|
30 render(document.layout ? "default/$document.layout" : 'default/base', content = content, model = model);
|
7
|
31 END %]
|
|
32 [% WRAPPER PAGE_LAYOUT;
|
|
33 WRAPPER CONTENT_LAYOUT;
|
|
34 content;
|
|
35 END;
|
|
36 END %]
|