Re: [Zope] How to prevent subobjects to catalog a parents attribute

2006-07-22 Thread Andreas Jung



--On 22. Juli 2006 17:08:43 +0330 Mohsen Moeeni [EMAIL PROTECTED] wrote:


Hi;

My folder (which extends ATFolder from ATContentTypes) has
a `catagory` attribute (field) which I want to be present in the
catalog both as index and metadata. So I have added the
`category` FiledIndex and metadata to my catalog object.
Everything is fine when I look at my indexed custom folder in the
catalog. However, the problem is that the subobjects of this
folder will also have the same value as their parent for the category
index and metadata because of the acquisition. Can I prevent this?


Look at ManageableIndexes...they provide control over acquistion while 
indexing.


-aj


pgppJLOe28W9p.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to prevent subobjects to catalog a parents attribute

2006-07-22 Thread Mohsen Moeeni

On 7/22/06, Andreas Jung [EMAIL PROTECTED] wrote:



--On 22. Juli 2006 17:08:43 +0330 Mohsen Moeeni [EMAIL PROTECTED] wrote:

 Hi;
 [snip]
 . However, the problem is that the subobjects of this
 folder will also have the same value as their parent for the category
 index and metadata because of the acquisition. Can I prevent this?

Look at ManageableIndexes...they provide control over acquistion while
indexing.


Thanks. I wish I could do it without installing a new product.
Actually I could get the same effect but with a little bit of
hackiness. I added a `category` index which indexed
`_getCategoryForCatalog` method which can not be acquired
by subobjects because it start with `_`.

At any rate, either of these approaches solve half of the problem.
The other half is to do the same thing for a metadata. I doubt
it's easy to do that because unlike an index, metadata is not
plugable.

Mohsen,
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )