changeset 320:2295fb564250 trunk

Forgot to add myghty templates for [393].
author cmlenz
date Tue, 24 Oct 2006 16:44:32 +0000
parents bab19496d4fa
children 36fe40de0444 6be95de7aa99
files examples/bench/myghty/base.myt examples/bench/myghty/template.myt
diffstat 2 files changed, 51 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/examples/bench/myghty/base.myt
@@ -0,0 +1,26 @@
+<!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" lang="en">
+
+<%method wrap>
+<%args scope="request">
+  title
+</%args>
+<div id="header">
+  <h1><% title %></h1>
+</div>
+
+<% m.content() %>
+
+</%method>
+
+<div id="footer"></div>
+</html>
+
+<%method greeting>
+<%args>
+   name
+</%args>
+Hello, <% name | h %>
+</%method>
new file mode 100644
--- /dev/null
+++ b/examples/bench/myghty/template.myt
@@ -0,0 +1,25 @@
+<%args>
+	title
+	items
+	user
+</%args>
+
+<head>
+  <title><% title %></title>
+</head>
+
+ <&|base.myt:wrap &>
+  <div><& base.myt:greeting, name=user &></div>
+  <div><& base.myt:greeting, name="me"&></div>
+  <div><& base.myt:greeting, name="world" &></div>
+
+  <h2>Loop</h2>
+%if items:
+      <ul>
+%	for item in items:
+  <li><% item %></li>
+%
+      </ul>
+%
+
+ </&>
Copyright (C) 2012-2017 Edgewall Software