On Feb 27, 2006, at 6:52 AM, jürgen Kartnaller wrote:

Gary Poster wrote:
[...]
Yes, we write custom templates that use hidden input fields. We reuse
the existing template by putting the default template on another
attribute of the view class, and then saying 'metal:use- macro="view/...'

For instance

class MyForm(zope.formlib.form.EditForm):
    base_template = zope.formlib.form.EditForm.template
template = (...a named template if you want, or just a page template
directly...)

Then in your template, you can refer to macros in the original like this:

    'metal:use-macro="view/base_template/macros/extra_info"'

Thanks a lot for this.

The above metal statement doesn't work, I do it this way :
  metal:use-macro="view/base_template/macros/main"
and then
  metal:fill-slot="extra_info"

Heh, yeah.  Thanks for clarifying.

Gary_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to