[stringtemplate-interest] Region Syntax

Andrew Hallock andrew.hallock at gmail.com
Tue Sep 25 10:45:00 PDT 2007


I can't seem to get the syntax right for Template Regions:

I need to set an attribute in an outer template (specifically, setting an
HTML document's title element) from within a subtemplate.

Say, for simplicity, I have a file "layout.st" which can compromise other
page templates.

layout.st would look like:
<html>
<title>
$@page_title()$
</title>
<body>
$(content_template_name)()$
</body>
</html>

How would you use the Template Region mechanism to set the layout's title
region from within the child template?  It would be the equivalent of
Django's template inheritance.

Regards,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20070925/826c6cc3/attachment.html 


More information about the stringtemplate-interest mailing list