[ZPT] Metal and macros
Tino Wildenhain
tino@wildenhain.de
Sat, 21 Jul 2001 17:23:27 +0200
Hi,
--On Samstag, 21. Juli 2001 00:01 +0200 Ulrich Eck <ueck@net-labs.de> wrote:
>> Actually, after looking at it some more, I think I'll make a
>> TALGenerator function that restricted code could import. This would let
>> you write Script code like this:
>>
>> from Products.PageTemplates.ZopePageTemplate import TALGenerator
>> gen = TALGenerator()
>> gen.emitRawText('<b>')
>> gen.emitText('Hi, %s, this is HTML quoted!' % context.getName())
>> gen.emitRawText('</b>')
>> return gen.getCode()
>>
>> This Script could then be used directly as a macro.
>>
Hm. This does not fit very well into the concept of ZPT imho.
Rather the mechanism should provide control over the DOM.
Then we had creator methods for various tags.
Something like
current_tag.replace(tal.htmltags.p(attributes={'align':'left'},content="Hel
lo world"))
What do you mean?
Regards
Tino
>
> Right at the moment this is exactly what i would need to build my
> portal_forms Tool
> for CMF ...
>
> Are there anny plans to implement this soon ??
>
> thanks
>
> Ulrich Eck
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt