[Zope] Not able to render a base class...
Tue, 05 Sep 2000 09:10:43 -0700
Brian Withun wrote:
> ===== :PREFACE: =====
> I have placed the __init.py__ and Renderable.py into
> .\lib\python\Products\Renderable and have restarted Zope (necessary? ..I'm
> too used to windows ;-)
> I made a trivial little Folderish ZClass and am trying to get it to render
> I've defined a 'view' tab that represents the ZClass, and it works as
> expected, with 'View' being bound to an 'index_html' method of my folderish
> I've added one of these ZClasses to a development folder.
> The development folder also contains a dtml document named 'index_html' as
> <dtml-var standard_html_header>
> <h2><dtml-var title_or_id></h2>
> This is the <dtml-var id> Document.
> <dtml-var one>
> <dtml-var standard_html_footer>
> 'test' is my product
> 'testclass' is my ZClass (in the product 'test')
> 'trial' is my development folder
> 'one' is the ZClass instance in the 'trial' folder
> 'Tropical' is an image id in the ZClass
> ===== :PROBLEM: =====
> Why does 'trial/index_html' render this:
> This is the index_html Document.
> <testclass instance at 00DD45A8>
> ..and how do I turn '<testclass instance at 00DD45A8>' into a rendering of
> the ZClass instance ?
Make sure your zclass inherits from Renderable
make a dtml method called render in your zclass
adjust render to display the zclass as you wish