I would have thought that the two examples below where equivalent but only
the top one works like expected. (It renders the page.)

The second one just shows the source of the vanilla dtml page.

test = HTMLFile('vanilla', globals())

def test(self):
    "A simpe test method"        
    return  HTMLFile('vanilla', globals())

How do I execute the dtml file in a method. I have searched the
documentation, but it is sketchy to say the least.

I cannot use the first approach as I need to define the filename on the fly
in my method.

def test(self):
    "A simpe test method"        
    return  HTMLFile('skins/' + self.skin, globals())

self.skin is only available in my object, so naturally if I try to say:

test = HTMLFile('skins/' + self.skin, globals())

I get an error.

        Max M

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to