[Zope] Re: automatically add to ZCatalog?
tom smith
tom@othermedia.com
Thu, 21 Nov 2002 13:25:47 +0000
--Apple-Mail-6--551594416
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
On Thursday, November 21, 2002, at 11:46 AM, Maik Jablonski wrote:
> tom smith wrote:
>> I have a blog where a search show the latest BlogItems ordered by date
>> I've looked everywhere and can't work out how to automatically add a
>> BlogItemClass instance to my ZCatalog.
>
> You must make your Product CatalogAware:
Sorry, it's a ZClass, but I made sure to add CatalogAware when I
created it.
> Depending on your Product you have to call self.reindex_object() after
> changes [esp. for the PropertyManager, which is not CatalogAware by
> default].
So, in my constructor I have...
instance =
container.ArticleFolderoid.createInObjectManager(request['id'], request)
instance.propertysheets.properties.manage_editProperties(request)
instance.reindex_object()
...and in update_Article I have...
instance = context.this()
instance.propertysheets.properties.manage_editProperties(request)
instance.reindex_object()
...and still, the items don't show on my searchResults driven front
page unless I go to the catalog and click "Find Objects"
--
tom smith
http://www.othermedia.com/blog/
0207 089 5959
3rd Floor, The Pavilion, Newham's Row, London SE1 3UZ
--Apple-Mail-6--551594416
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
charset=US-ASCII
On Thursday, November 21, 2002, at 11:46 AM, Maik Jablonski wrote:
<excerpt>tom smith wrote:
<excerpt>I have a blog where a search show the latest BlogItems
ordered by date
I've looked everywhere and can't work out how to automatically add a
BlogItemClass instance to my ZCatalog.
</excerpt>
You must make your Product CatalogAware:
</excerpt>Sorry, it's a ZClass, but I made sure to add CatalogAware
when I created it.
<excerpt>Depending on your Product you have to call
self.reindex_object() after changes [esp. for the PropertyManager,
which is not CatalogAware by default].
</excerpt>
So, in my constructor I have...
instance =
container.ArticleFolderoid.createInObjectManager(request['id'],
request)
instance.propertysheets.properties.manage_editProperties(request)
instance.reindex_object()
...and in update_Article I have...
instance = context.this()
instance.propertysheets.properties.manage_editProperties(request)
instance.reindex_object()
...and still, the items don't show on my searchResults driven front
page unless I go to the catalog and click "Find Objects"
<fontfamily><param>Helvetica</param>
--
tom smith
http://www.othermedia.com/blog/
0207 089 5959
3rd Floor, The Pavilion, Newham's Row, London SE1 3UZ</fontfamily>
--Apple-Mail-6--551594416--