On 11/29/06, Dennis Schulz <[EMAIL PROTECTED]> wrote:

in a formlib based form I would like to have more control over the
rendering of the widgets.
is it possible to call widget with a specific name directly instead of
running through all on a repeat loop?
for example

  <div tal:define="name string:1;
                  w1 view/widgets.get(name)" >

I saw that there is a get method but I can't access it form the page

It certainly is possible. As another reply pointed out, you're mixing
Path and Python expressions above, which won't work.

A common technique I use is to define a local reference to widgets
(often to something short like 'w'), and then access the widgets
within that setup::

   <form ... tal:define="w view/widgets">

     <!-- call (render) the firstname widget -->
     <input tal:replace="structure w/firstname" />


Anyways, you can use the 'python' or 'nocall' expressions if you want
to get the widget unrendered:

   <div tal:define="w1 python:view.widgets['1']">
   <div tal:define="w1 python:view.widgets.get('1')">
   <div tal:define="w1 nocall:view/widgets/1">

Jeff Shell
Zope3-users mailing list

Reply via email to