[stringtemplate-interest] Does StringTemplate support components?
Terence Parr
parrt at cs.usfca.edu
Thu Dec 21 14:44:28 PST 2006
On Dec 21, 2006, at 2:12 PM, Nate wrote:
> Why not give the parent template an attribute "forumUserBox" that
> is the
> configured StringTemplate it needs to use. Then I believe
> $forumUserBox()$ executes the configured template.
just $forumUserBox$ actually.
The best way is to create the structured tree of nested STs with the
controller, pulling from the model. That is how I build ST for
generating complicated source files. With web pages, same thing
applies. For example, page.st refers to $body$ which is created in a
body() method or something that also sets parameters. If body needs
a value like title then it can just refer to it if it is in an
enclosing template.
Ter
More information about the stringtemplate-interest
mailing list