[Zope] External methods, DocumentTemplate and EPSF

raver@box.dust.za.net raver@box.dust.za.net
Thu, 6 May 1999 00:20:02 -0100


On Wed, May 05, 1999 at 12:46:25PM -0400, Pavlos Christoforou wrote:
> On Wed, 5 May 1999 raver@box.dust.za.net wrote:
> 
> 
> I am not sure I inderstand your second question.
> 
> Pavlos


At least U cleared out my problems on first and third question. Thanks!

I'll try to clear up on the second question:

I have one setup method (DTML one) in my top level folder, cut down version 
shown below:

<!-- Make links-->
<!--#var "_[l]"-->
<!--Make navbar-->
<!--#var navbar-->
<!--#Display main content-->
<!--#var "_[c]"-->

Most of my folders contain the two DTML methods (links and contents) and
my index_html is like:

<!--#var standard_html_header-->
<!--#with "_.namespace(l='links', c='contents)"-->
<!--#var setup-->
<!--#/with-->
<!--#var standard_html_header-->

In special cases where I need to use the same setup, but have the content be
another file than 'contents' (say new_content) I do:

...
<!--#with "_.namespace(l='links', c='new_content)"-->
...

This is all good when I do it from within Zope, but I want an external
method to be able to produce a page the same way, using the EPSF. I need my
method to be able to access:

standard_html_header, setup and standard_html_footer (sometimes also links
and contents). Trying to access any with self (like self.setup) gives an
error. Probably because these aren't contained in the calling folder, but
aqusitioned from folders lower down?? 

So finally my question is: How do I get to the above mentioned DTML methods
from within an external method?

Sture