...
Note |
---|
This article probably should be merged in with Group Files. Also, on some points it seemed out-of-date - I've made annotations in red where I think this occurs. - Graham Wideman 2009-05-21 |
...
Just like you would do with a class definition in other languages, a template group may inherit features (templates and maps) from another template group, the supergroup. If template t is not found in a group, it is looked up in the supergroup, if present. This works regardless of whether you use a group file format or load templates from the disk via a StringTemplateGroup
object. Currently you cannot use the group file syntax to specify a supergroup. I am investigating how this should work. In the meantime, you must explicitly set the supergroup in code.
I think this is now handled by the syntax discussed in Group Files. - GW
No Format |
---|
group mygroup : supergroup; ... |
...
StringTemplate
group maps also inherit. If an attribute reference is not found, StringTemplate
looks for a map in its group with that name. If not found, the super group is checked.
See more extensive details regarding template and attribute lookup here: Template and attribute lookup rules