I am using StringTemplate to create HTML and I use If you are wondering why I would like to do this, see an example from the StringTemplate Docs: All the above one file (Test.st) and we are using However, if you want to create a library of simple supportive templates, you can find them all in one file and each of them is accessible to templates in other files. Disclaimer: I am using You have to use STGroupFile and
STGroupDir This way I have a directory of group files. In this way I can include multiple templates in a file, but I can add templates from many files. It does not appear that there is support for it, but I thought that if I see something then I will see it.
test (name) :: = "$ name: bracket () $ "// Apply bracket template in each name bracket (x): =" [$ x $] "// parameter parameter with square bracket
STGroupDir , it will be unable to resolve the "bracket (x)" template unless it is a separate file (bracket.st) Not in In this particular example, the bracket is like a local assistant that is useful for cleaning the main template. In this case, you probably do not want to show the bracket outside of the test.
StringTemplate in C # Em>
.stg files with a group of templates.
StringTemplate groups can import groups of other templates or templates, and you can create those groups from a file or directory.
No comments:
Post a Comment