Does there exist a template library for Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Does there exist a template library for Pharo

FDominicus
I wonder if something like embedding Smalltalk in other texts
is somwhere to be foudn for Pharo e.g

"This is some letter
you  (<% self name %>) can sign here
to <% self printwhateverShouldBePrintedHere %>"

So embedding Smalltallk into documents with add "dynamic" content

I'm not looking in something like the HTMl stuff generated from
Smalltalk but a text fiel in which there are areas in which one can
execute and/or print information from Smalltalk..

Thanks for any hint

Regards
Friedrich

Reply | Threaded
Open this post in threaded view
|

Re: Does there exist a template library for Pharo

Esteban A. Maringolo
Norbert Hartl implemented Mustache templating for Pharo:
http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/

'This is some letter
you  ({{ name }}) can sign here
to {{ whatever }}' asMustacheTemplate value: { 'name' -> 'Friedrich'.
'whatever' -> [ self printwhateverShouldBePrintedHere ] } asDictionary

Regards!
Esteban A. Maringolo


2013/12/6 Friedrich Dominicus <[hidden email]>:

> I wonder if something like embedding Smalltalk in other texts
> is somwhere to be foudn for Pharo e.g
>
> "This is some letter
> you  (<% self name %>) can sign here
> to <% self printwhateverShouldBePrintedHere %>"
>
> So embedding Smalltallk into documents with add "dynamic" content
>
> I'm not looking in something like the HTMl stuff generated from
> Smalltalk but a text fiel in which there are areas in which one can
> execute and/or print information from Smalltalk..
>
> Thanks for any hint
>
> Regards
> Friedrich
>