Re: [Zope3-Users] Can't rename objects
But I want to choose names for certain kind of objects. It works when I'm not implementing IContainerNamesContainer. As before see my previous post, but I'll paste it here: 1. Since I have a custom container that is derived from IContainer, it is already configured as a IContainerNamesContainer, and if I override chooseName() and checkName(), I get the desired effect of choosing my own names. 2. I did not adapt my container to IContainerNamesContainer, and so Rename is now enabled. This I do not understand, but it works. 3. I put a custom template in the browser:addform directive. The template was a copy of the zope.app.form.browser.add template, but I edited out the Object Name field. I have the desired effect. All seems to work very well. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Skinning problem
Marius Gedminas wrote: On Wed, Jan 17, 2007 at 09:50:58PM +0100, Florian Lindner wrote: Hello, I have a ressourceDirectory with a file styles.css resourceDirectory directory=files name=files / I refer to it in my default template: link rel=stylesheet type=text/css tal:attributes=href context/@@/files/styles.css / That's no good. The /@@/ view only works when context is a site. Besides, I'm not sure you can use it in a TALES expression like this. You want link rel=stylesheet type=text/css tal:attributes=href context/++resource++files/styles.css / I think. (I'm sure href context/++resource++name.css is the right solution for plain resource files, but I haven't used resourceDirectory much.) It works like that for resourceDirectory resources as well. -- http://worldcookery.com -- Professional Zope documentation and training 2nd edition of Web Component Development with Zope 3 is now shipping! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Zope 3 Boot Camp and Sprint registration open
The Triangle (NC) Zope and Python Users Group invites you to register for Camp 5 and the BBQ Sprint: http://trizpug.org/boot-camp/camp5/ This is a Zope 3 boot camp followed by a Plone 3 sprint. The boot camp is taught by Philipp von Weitershausen, author of Web Component Development with Zope 3. The training has previously only been offered in Europe and is now available in North America for the first time. The sprint includes several sponsored and invited sprinters. TriZPUG hopes you will participate in Camp 5 in Chapel Hill, NC. Camp 5: Saturday March 10 - Tuesday March 13, 2007 BBQ Sprint: Wednesday March 14 - Saturday March 17, 2007 -- Sincerely, Chris Calloway http://www.seacoos.org office: 332 Chapman Hall phone: (919) 962-4323 mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Problems reindexing on ObjectModifiedEvent
Hi list, For some reason, everytime an object is modified, all of the catalog information for that object is lost. A full catalog reindex works. Do I need to subscribe the interfaces of the catalog indexes to the ObjectModfiedEvent or something? I appreciate any pointers. Thanks, Kevin Smith formlib code: @action(_(Apply), condition=haveInputWidgets) def handle_edit_action(self, action, data): if applyChanges(self.context, self.form_fields, data, self.adapters): zope.event.notify(ObjectModifiedEvent(self.context)) sample interface used in a setindex: class ISection(interface.Interface): section = schema.List(title=uSection, value_type=schema.TextLine(title=u'Section'), default=[], required=False) ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems reindexing on ObjectModifiedEvent
I need to investigate this further now, but this problem so far seems to isolated to the ValueIndex. Also, when the ObjectModifiedEvent is replaced with an ObjectCreatedEvent, the object is properly indexed. ... --- [EMAIL PROTECTED] wrote: Hi list, For some reason, everytime an object is modified, all of the catalog information for that object is lost. A full catalog reindex works. Do I need to subscribe the interfaces of the catalog indexes to the ObjectModfiedEvent or something? I appreciate any pointers. Thanks, Kevin Smith formlib code: @action(_(Apply), condition=haveInputWidgets) def handle_edit_action(self, action, data): if applyChanges(self.context, self.form_fields, data, self.adapters): zope.event.notify(ObjectModifiedEvent(self.context)) sample interface used in a setindex: class ISection(interface.Interface): section = schema.List(title=uSection, value_type=schema.TextLine(title=u'Section'), default=[], required=False) ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Skinning problem
Am Donnerstag, 18. Januar 2007 16:24 schrieb Philipp von Weitershausen: Marius Gedminas wrote: On Wed, Jan 17, 2007 at 09:50:58PM +0100, Florian Lindner wrote: Hello, I have a ressourceDirectory with a file styles.css resourceDirectory directory=files name=files / I refer to it in my default template: link rel=stylesheet type=text/css tal:attributes=href context/@@/files/styles.css / That's no good. The /@@/ view only works when context is a site. Besides, I'm not sure you can use it in a TALES expression like this. You want link rel=stylesheet type=text/css tal:attributes=href context/++resource++files/styles.css / I think. (I'm sure href context/++resource++name.css is the right solution for plain resource files, but I haven't used resourceDirectory much.) It works like that for resourceDirectory resources as well. Yes, it works fine but now I have another problem: The tempate contains links like: a tal:attributes=href context/@@contact.html/@@absolute_urlkontakt/a contact.html is registered for the interface (IXGM) of the object in which the object that should use the template (IBlog) resides. But in the IBlog context there is no contact.html. What is the best way to work around this? - Register contact HTML for all interfaces? - Make them static (no TAL) links? Both are ways I don't really like. Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems reindexing on ObjectModifiedEvent
On Jan 18, 2007, at 4:07 PM, [EMAIL PROTECTED] wrote: I need to investigate this further now, but this problem so far seems to isolated to the ValueIndex. Also, when the ObjectModifiedEvent is replaced with an ObjectCreatedEvent, the object is properly indexed. Hi Kevin. We don't know of any issues with the ValueIndex, nor does this problem sound familiar. While I can't help you diagnose, if you discover the problem and it's in zc.catalog then I will help fix! Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Skinning problem
On 18 Jan 2007, at 22:10 , Florian Lindner wrote: Am Donnerstag, 18. Januar 2007 16:24 schrieb Philipp von Weitershausen: Marius Gedminas wrote: On Wed, Jan 17, 2007 at 09:50:58PM +0100, Florian Lindner wrote: Hello, I have a ressourceDirectory with a file styles.css resourceDirectory directory=files name=files / I refer to it in my default template: link rel=stylesheet type=text/css tal:attributes=href context/@@/files/styles.css / That's no good. The /@@/ view only works when context is a site. Besides, I'm not sure you can use it in a TALES expression like this. You want link rel=stylesheet type=text/css tal:attributes=href context/++resource++files/ styles.css / I think. (I'm sure href context/++resource++name.css is the right solution for plain resource files, but I haven't used resourceDirectory much.) It works like that for resourceDirectory resources as well. Yes, it works fine but now I have another problem: The tempate contains links like: Which template? a tal:attributes=href context/@@contact.html/ @@absolute_urlkontakt/a contact.html is registered for the interface (IXGM) of the object in which the object that should use the template (IBlog) resides. But in the IBlog context there is no contact.html. What is the best way to work around this? - Register contact HTML for all interfaces? - Make them static (no TAL) links? Both are ways I don't really like. I'm not getting this. Before you asked about resources, now all of a sudden it's about a template? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Skinning problem
On Thu, Jan 18, 2007 at 10:10:20PM +0100, Florian Lindner wrote: Yes, it works fine but now I have another problem: The tempate contains links like: a tal:attributes=href context/@@contact.html/@@absolute_urlkontakt/a contact.html is registered for the interface (IXGM) of the object in which the object that should use the template (IBlog) resides. But in the IBlog context there is no contact.html. So, if I understand you correctly, you have URLs like /foo/bar/xgm/blog/@@myview.html where myview.html uses the template above, and you want that view to have an absolute URL to /foo/bar/xgm/@@contact.html ? What is the best way to work around this? - Register contact HTML for all interfaces? No? - Make them static (no TAL) links? That would work. a href=../../contact.html.../a Both are ways I don't really like. Or you could use a tal:attributes=href string:${context/zope:parent/@@absolute_url}/@@contact.htmlkontakt/a The pattern is to get to the desired new context of the view you want to link to, apply @@absolute_url to it, and then concatenate the new view name to that string. (It might be a nice extension to the AbsoluteURL view(s) to make them traversable so that you could say obj/@@absolute_url/something_to_append in a TALES expression. But it wouldn't work when something_to_append starts with '@@'.) Marius Gedminas -- Never, ever expect hackers to be able to read closed proprietary document formats like Microsoft Word. Most hackers react to these about as well as you would to having a pile of steaming pig manure dumped on your doorstep. -- ESR (http://www.tuxedo.org/~esr/faqs/smart-questions.html) signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users