jkinsley writes:
... def manage_addMyProductForm(client, REQUEST, *args, **kw): """Returns form to add My Product.""" .... form=PageTemplateFile('forms/manage_addMyProductForm.pt', globals(), __name__='manage_addMyProductFormTmpl')
# Here is where my problem is. # This fails with an AttributeError on other in # Shared.DC.Scripts.Bindings._getTraverseSubpath # Where REQUEST.other is used. return form(client, REQUEST, args=args, pass_test1=pass_test1, pass_test2=pass_test2) PageTemplates are not called like DTML objects.
Try: return form.__of__(client)(args=args,pass_test1=pass_test1,...)
Finally in the form template, I want to be able to do something like this:
<tr tal:condition="not:pass_test1"> What you pass in as arguments is available inside the page template as contents of "options", i.e. the above reads:
<tr tal:condition="not: options/pass_test1"> Dieter