[Zope3-Users] Object Name field on addforms

Florian Lindner mailinglists at xgm.de
Sun Sep 11 10:07:39 EDT 2005


Am Sonntag, 11. September 2005 15:04 schrieb Florian Lindner:
> Hello
> the auto generated add forms sometimes dispaly a field for the Object Name.
>
> add.pt
>
>  <span tal:condition="context/nameAllowed|nothing" tal:omit-tag="">
>                &nbsp;&nbsp;<b i18n:translate="">Object Name</b>&nbsp;&nbsp;
>               <input type='text' name='add_input_name'
>                      tal:attributes="value context/contentName" />
>
> This is depended if the container implements IContainerNamesContainer:
>
> app.py
>
>
>     def nameAllowed(self):
>         """Return whether names can be input by the user."""
>         return not IContainerNamesContainer.providedBy(self.context)
>
> I have a Container (implementing IContainer, Interface (via Interface
> inheritance) and via ZCML IAttributeAnnotatable and IContentContainer.
>
> On the auto-generated addform in my layer the Object Name is not shown.
> Why?

Another addition:

The field is displayed when the addform is called with 
folder/+/AddCSLink.html.
When folder/AddCSLink.html is is not displayed.
What is the difference between these two?

Unfortunatly when you use the addform directive to register a menu item the 
action is folder/AddCSLink.html. Can this be changed?

Florian


More information about the Zope3-users mailing list