Hi Tim,

Tim Knapp schrieb:
Hi,

I would like to use plone.z3cform in a viewlet but I'd also like to add
some descriptive text beside the widget as well as some other
miscellaneous TAL/HTML. In order to render the widgets in the
plone.z3cform how do I get access to them, are they available from the
'view' object somehow or by some other means? I'm also assuming to
render the widget (once I've got it), I just call the widget.render()
method?

<tal:r replace="structure python:view.widgets['message'].render()" />

You need to use your own layout cause the standard form wrapper wraps the form into the main_template.
This should work (untested):

from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile

layout = ViewPageTemplateFile('mylayout.pt')

wrap_form(my_unwrapped_form, index=layout)

..Carsten

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to