[Zope] ZTemplates without Zope

Michel Pelletier michel@digicool.com
Thu, 1 Apr 1999 09:46:28 -0500


> -----Original Message-----
> From: Oleg Broytmann [mailto:phd@sun.med.ru]
> Sent: Thursday, April 01, 1999 2:31 AM
> To: Zope Mailing List
> Subject: [Zope] ZTemplates without Zope
> 
> 
> Hello!
> 
>    I am trying to rewrite some of my CGIs using ZTemplates, 
> no Zope yet. I
> want to clarify some points I do not understand clear. Any 
> help welcome.
> 
>    Think I will write a DTML file, and there is the tag
> <!--#var standard_html_header-->
>    As far as I understand, there is no way for DTML to place
> standard_html_header into a file - aquiring and rendering IDs 
> is a job of
> Zope, not ZTemplates, right?
> 

Sort of.  Aquisition can be used without Zope.  If the object you want
to *provide* an attribute inherits ExtensionClass.Base, and the object
you want to *acquire* an attribute inherits Acquisition.Implicit, then
if you access the acquirer in the context of the acquired you can mimic
the behavior.

>    What method I can use? Do I need to create few instances of
> DocumentTemplate.HTMLfile and call them with different 
> files/objects? Any
> simpler way?
> 

Hmm.  It seems pretty simple to me.  Perhaps if you post a snip of the
code you feel is complex we can show you were the trim it, if it needs
it.

-Michel

> Oleg.
> ---- 
>     Oleg Broytmann  National Research Surgery Centre  
> http://sun.med.ru/~phd/
>            Programmers don't die, 
> they just GOSUB without RETURN.
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>