[ZPT] zpt macro question. Widgets?

Michael A Rowley os2mac at earthlink.net
Thu Mar 25 21:04:12 EST 2004


Hello!

I have a question about the supplied macros that come with zope....  I 
am have been using the following to access data from the current 
object....

<div tal:repeat="field python:here.Schema().filterFields(isMetadata=0)">
<span metal:use-macro="python: here.widget(field.getName(), 
mode='view', use_label=1)">
</div>

I understand what line one does, but the span line is confusing me.  I 
am a beginner, so please forgive is this is stupid... )

I have been trying to trace down the code that performs the work in 
line 2...  I know it is calling the script widget, passing the name of 
the field returned in line one, in view mode, and it wants the label 
placed in the widget... But where is the 'widget' script... I have 
looked in plone_scripts, and in the product root in the ZMI, but I 
can't locate it, and it doesn't seem to be on the local FS...

Now, I am using Archetypes, and there is a subdirectory in the 
skins/archetypes directory with pt files for the different types of 
fields, but, widget would have to be a script, correct?

Can anyone help me out here?

Michael.




More information about the ZPT mailing list