Max Møller Rasmussen wrote:
> I want to write my "index_html" method so that it returns a rendered version
> of "list.dtml" corresponding to the selected view, by the name of the folder
> holding the selected view.
>
> something like this (which doesn't work):
>
> def index_html():
> return HTMLFile('views/' + self.selView+ 'list')
You actually want to write a __call__ method (something) like this:
def __call__(self, REQUEST=None, **kw):
""""""
return apply(HTMLFile('views/' + self.selView+
'list'),(self,REQUEST),kw)
index_html=None
...this last bit is needed so index_html isn't acquired from an object
above.
cheers,
Chris
_______________________________________________
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )