iris/_examples/view/quicktemplate/templates/base.qtpl

37 lines
654 B
Plaintext
Raw Normal View History

This is our templates' base implementation.
{% interface
Partial {
Body()
}
%}
Template writes a template implementing the Partial interface.
{% func Template(p Partial) %}
<html>
<head>
<title>Quicktemplate integration with Iris</title>
</head>
<body>
<div>
Header contents here...
</div>
<div style="margin:10px;">
{%= p.Body() %}
</div>
</body>
<footer>
Footer contents here...
</footer>
</html>
{% endfunc %}
Base template implementation. Other pages may inherit from it if they need
overriding only certain Partial methods.
{% code type Base struct {} %}
{% func (b *Base) Body() %}This is the base body{% endfunc %}