/
window.tal
64 lines (56 loc) · 1.94 KB
/
window.tal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html
tal:in-package="talcl"
xmlns:tal="http://common-lisp.net/project/bese/tal/core"
xmlns:param="http://common-lisp.net/project/bese/tal/params"
tal:let="true-value t false-value nil"
>
<tal:def tal:name="my-new-sub">
<h4>This sub template can be reused all over the place</h4>
</tal:def>
<head>
<title tal:content="$page-title" />
</head>
<body>
<div id="page" >
<div id="$header-dom-id" >
<h1 >$page-title</h1>
<!-- these are equivalent ways to execute some lisp
and splice its result into the template -->
<tal:lisp>(format nil "*** ~A ***" page-title)</tal:lisp>
$(format nil "### ~A ###" page-title)
<tal:lisp>(format nil "*** ~A ***" page-title)
(format nil "||| ~A |||" page-title)</tal:lisp>
<span tal:when="$true-value">Dollars signs *may* be elided in tal attributes</span>
<span tal:when="true-value">Should be in the output</span>
<span tal:when="false-value">Should never appear in the output</span>
$my-new-sub
<tal:include tal:name="main-menu.tal" param:dom-id="nav-dom-id" >
<param:other-content>
<span>A snippet of html to pass through</span>
<!-- tal:tal tags are replaced by their content-->
<tal:tal tal:content="my-new-sub" />
<!-- tal:replace removes the tag it is on and puts its
content in the dom instead-->
<span tal:replace="my-new-sub" />
</param:other-content>
</tal:include>
<div class="killfloat"></div>
</div>
<div id="contentBg">
<tal:tal tal:content="$escaped-html-string" />
${escaped-html-string}
<hr />
<tal:tal tal:content-as-is="unescaped-html-string" />
<hr />
<div class="content-body" tal:content-as-is="$body"/>
<div class="kill-float"></div>
</div><!-- contentBg -->
<div id="footer">
<tal:tal tal:content-as-is="$(example-footer-menu)" />
<div class="killfloat"></div>
</div>
</div><!-- page -->
</body>
<!-- descriptions -->
<tal:describe-handlers tal:when="$print-help" />
</html>