[stringtemplate-interest] Formal parameters in web templates

Ran Tavory rantav at gmail.com
Tue Oct 27 07:02:20 PDT 2009


Thomas - am I asking for template reflection?
Not necessarily. I'd actually prefer if the template could declare its
formal parameters at the beginning so that someone reading it would know
what it needs without having to dig in.

On Tue, Oct 27, 2009 at 3:58 PM, Thomas Jackson <
thomas.jackson.iii at gmail.com> wrote:

> Are you asking for Template Reflection to see possible the attributes that
> need setting for that template?
>
>  A newbe question: Is it possible to define the list of formal parameters
>> in a template where my use case would be for a web page?
>>
>> For example, in this template:
>>
>> layout.st <http://layout.st>
>>
>> <html>
>> <head>
>> <title>$title$</title>
>> <body>
>> $banner()$
>> <hr>
>> $body()$
>> </body>
>> </html>
>>
>> I'd like to say that *$title$* is a required parameter. Would even be
>> better if types can be enforced, such as String, Number, Date, List of x
>> etc, but even without static typing, simply listing the formal arguments the
>> template expects would be great.
>> Thanks!
>> ------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091027/7cbb0492/attachment.html 


More information about the stringtemplate-interest mailing list