-
Notifications
You must be signed in to change notification settings - Fork 0
Examples
Adam Stallard edited this page Aug 28, 2013
·
19 revisions
## MainPage - ForumPage
This example shows how you can reuse an outer structure (myBody) on multiple pages. The same header and footer modules (not shown) will be applied to both pages.
myBody.xml
<body>
<myHeader/>
<div uses="content"/>
<myFooter/>
</body>
thread.xml
<div>
<h2 uses="title"/>
<div uses="posts"/>
</div>
post.xml
<div>
<h3 uses="name"/>
<p uses="message"/>
</div>
main-pre.html
<html>
<head>
<include>myBody</include>
</head>
<myBody>
<content>
<p>This is main content.</p>
<p>And this.</p>
</content>
</myBody>
</html>
forum-pre.html
<html>
<head>
<include>myBody</include>
<include>thread</include>
<include>post</include>
</head>
<myBody>
<content>
<div id="sidebar">
<thread demo>
<title>Fake Example Thread</title>
<posts>
<post>
<name>John Doe</name>
<message>Fake post.</message>
</post>
</posts>
</thread>
</div>
</content>
</myBody>
</html>