[Zope] Question about the default view of a ZClass named index_html

Geir Bækholt Geir Bækholt <geirh@funcom.com>
Mon, 13 Aug 2001 12:51:43 +0200


The solution for this annoying bug, is to make your product inherit
from Lalos excellent renderable base class (
http://www.zope.org/Members/lalo/Renderable-ZClass )
, and make a DTMLmethod called "render" containing <dtml-var
index_html>

The cause seems to be in the differentiation between zope/python using
__call__ or __str__ behind the curtains when publishing zclasses..



--=20
Geir B=E6kholt                   web-developer/zopatista
geirh@funcom.com             funcom oslo | webdev-team

            <!-- PGPid : 0x90B47B20 -->



on or about, Monday, August 13, 2001, we have reason to believe that Michie=
l Toneman wrote something along the lines of :


MT> Im trying to create a product for a simplified Content Management System
MT> based on Zope (i.e. even simpler than the Zope interface ;-) ). To do
MT> this, I want the equivalent of a DTML document, with a custom editing
MT> interface...

MT> I have created a new product, containing a ZClass which has the
MT> following base classes: ZObject, CatalogAwareBase, ZDTMLDocument. I'm
MT> doing OK with this, except that I can't figure out how to make a product
MT> instance use it's default 'View' method when it is named 'index_html'.

MT> If I call it index_html, the following URLs get me a zero sized reply of
MT> mime-type text/x-unknown-content-type.=20

MT> http://server/MyFolder/
MT> http://server/MyFolder/index_html

MT> However, I can use the object as=20

MT> http://server/MyFolder/index_html/index_html

MT> And everything goes well.... Also, if I rename the object to something
MT> else, I don't have this problem.

MT> Anyone have a solution/workaround for this bug=3F

MT> Greetings,

MT> Michiel=20