iris/_examples/view/quicktemplate/templates/base.qtpl
Gerasimos (Makis) Maropoulos ed45c77be5 reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker
Former-commit-id: ed635ee95de7160cde11eaabc0c1dcb0e460a620
2020-06-07 15:26:06 +03:00

37 lines
654 B
Plaintext

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 %}