[stringtemplate-interest] Referense template in other file.

Terence Parr parrt at cs.usfca.edu
Wed Apr 18 12:53:07 PDT 2007


On Apr 16, 2007, at 3:29 AM, Andrew Melnichuk wrote:

> Hi.
>
> I have a template group file 'basegroup.stg' and it contains  
> definition of simple template
>
> group basegroup;
> page1() ::= "$sharedview/somecontent()$"
>
> There is a subdirectory called 'sharedview' which contains template  
> file 'somecontent.st' with simple content:
>
> <p>Some_content_to_show</ p>
>
> I'm trying to load tempalte group and display 'page1' template, and  
> i'm awaiting that it displays content from referenced tempalte as  
> well, but i have an error:

Hi Andrew,

The issue is that ST assumes all stuff is in the group; I don't mix/ 
max files and groups at the moment.  My original co-designer, Tom  
Burns, and I are thinking of reworking this so groups just act like  
directories.

Sorry for the hassle.  You can just override the loadtemplate method  
in STG I think though.

Ter


More information about the stringtemplate-interest mailing list