[Zope3-Users] Re: How to do addform+addmenuitem 'manually'

Adam Groszer adamg at fw.hu
Thu Aug 25 14:43:08 EDT 2005


Gosh, I think I was too tired. To answer my own question, the simplest
solution is:

  <browser:addform
      schema="szscreen.interfaces.ISzemely"
      content_factory="szscreen.app.Szemely"
      label="Uj Szemely"
      name="AddSzemely.html"
      permission="zope.ManageContent"
      set_before_add="name"
      class="szscreen.browser.helper.SzemelyAddView"
      template="szemely_add.pt"
      >
  </browser:addform>

  <browser:addMenuItem
      title="Szemely"
      class="szscreen.app.Szemely"
      permission="zope.ManageContent"
          view="AddSzemely.html"
      />

because browser:addform has a class and template attribute.
      
Wednesday, August 24, 2005, 8:32:38 PM, you wrote:

> Adam Groszer wrote:
>> I would like to change the automatically generated forms to template
>> based one's, but I'm stuck at the configuration.
>> 
>>   <browser:addform
>>       schema="szscreen.interfaces.ISzerep"
>>       content_factory="szscreen.app.Szerep"
>>       label="Uj Szerep"
>>       name="AddSzerep.html"
>>       permission="zope.ManageContent"
>>           set_before_add="name"
>>           >
>>   </browser:addform>
>> 
>>   <browser:addMenuItem
>>       title="Szerep"
>>       class="szscreen.app.Szerep"
>>       permission="zope.ManageContent"
>>           view="AddSzerep.html"
>>       />
>> 
>> I think I need something like this:
>> <browser:page
>>       name="AddSzerep.html"
>>           for="szscreen.interfaces.ISzerep"
>>           class="szscreen.browser.helper.SzerepAddView"
>>           template="szerep.pt"
>>           permission="zope.ManageContent"
>>           >
>>   </browser:page>
>> 
>> but the addmenuitem I cannot manage,
>> 
>> Please help

> Try to add this to browser:page :

>       menu="zmi_views" title="Szerep"

> Jürgen

> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users



-- 
Best regards,
 Adam                            mailto:adamg at fw.hu
--




More information about the Zope3-users mailing list