[Zope] changing the default document

Chris McDonough chrism@digicool.com
Mon, 31 Jan 2000 23:33:52 -0500


To be thorough, you'd have to change it in a lot of places.  It's a
method of quite a few renderable object instance in your database, sort
of akin to Python's __repr__ method of an object.

If you just want to do this for your own purposes, I would suggest
writing a Python class that subclasses the Zope Folder class (in
OFS/Folder.py) and does "the right thing" when the index_dtml method is
called on it.  It would also need to have an appropriate constructor
that automagically puts an index_dtml method inside the folder when it's
instantiated.  This would have a limitation in that the root object (the
App object) would still call index_html to render itself, but all your
custom folders would be able to do the right thing for you.

Or, of course, you could just not.  :-)

Eron Lloyd wrote:
> 
> Hey guys, I wanted to change the default method from index_html to
> index_dtml. I did the work-around by adding the top-level "<dtml-var
> index_dtml>" trick, but I was wondering where within the source could I
> permanently change this? Also, is there an easy way that I could make
> Zope add an index_dtml instead of index_html each time I go to add a
> folder that needs a public interface? I kinda looked at the source but
> I'm not real good with Python (yet), so it might have slipped me by.
> 
> Thanks in advance,
> 
> Eron
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )

-- 
Chris McDonough
Digital Creations, Inc.
Zope - http://www.zope.org