forked from unusorin/php-xtemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex7.xtpl
executable file
·32 lines (32 loc) · 1.23 KB
/
ex7.xtpl
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
<!-- BEGIN: main -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="Co-Comp Ltd" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>example 7</title>
</head>
<!-- $HeadURL: https://xtpl.svn.sourceforge.net/svnroot/xtpl/trunk/ex7.xtpl $
$Id: ex7.xtpl 16 2007-01-11 03:02:49Z cocomp $ -->
<body>
<p>You can include template files inside another one, even recursively!<br />
for example:<br />
{FILE "ex7-inc.xtpl"}
<br /><br /><br />
if your include file contains blocks, you start its name it with tha original file's actual block..
(the FILE directive gets replaced by the file contents, and the whole thing gets parsed)<br />
example:<br />
<br />
<!-- BEGIN: inc -->
included file follows: {FILE "ex7-inc2.xtpl"}
<!-- END: inc -->
<br />
<br />
You can even choose to include files base on your code logic.<br />
Here we're including a language file, however the same could be done for different target output platforms e.g. Browser, PDA, smartphone etc.:<br />
{FILE {LANGUAGE}}
</p>
</body>
</html>
<!-- END: main -->