[Product-Developers] Re: custom at edit form?

Derek Richardson derek.richardson at gatech.edu
Thu Mar 13 18:23:09 UTC 2008


Still fails. :( Same error. :(

I am now suspecting that the problem has to do with base_edit.cpt being 
a *cpt* and not a *pt*. I think, when I make my changes, 
base_validate.vpy is not called and thus 'errors' is not populated for 
the field.pt to access.

Anyone have any hints along this line? Zope 2 is so arcane! ;)

Derek


Hedley Roos wrote:
> Assuming that your content type is called Foo create a file
> foo_edit.pt with the following content. I believe this is the simplest
> way to override the widget rendering.
> 
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
>       lang="en-US"
>       metal:use-macro="here/main_template/macros/master">
> <body>
> 
> <div metal:fill-slot="main">
> 
> <metal:body define-macro="body">
> <metal:bodyuse use-macro="here/edit_macros/macros/body">
> 
>   <metal:widgets fill-slot="widgets">
>     <metal:fieldMacro use-macro="python:here.widget('title', mode='edit')" />
>   </metal:widgets>
> 
> </metal:bodyuse>
> </metal:body>
> 
> </div>
> 
> </body>
> </html>
> 
> In fact the html, body and div boilerplate is not needed.
> 
> HTH
> Hedley





More information about the Product-Developers mailing list