Entry
How can I automatically update my ZCatalog when items have been added/modified/changed?
Oct 30th, 2008 17:19
games games, unknown unknown, R. David Murray
Any objects that you want to be automatically updated in the Catalog
must have CatalogAware as one of their base classes. And then you
have to add a reindex_object call to any forms that add or update
them.
(I fail to understand why one has to explictly call reindex_object
when
properties change, even though I think someone tried to explain it to
me
once).
I suppose you could do something similar with non-catalog aware
objects,
where you made sure the add/update forms called the Catalog to index
them, but they wouldn't get deleted from the catalog automatically, or
reindexed automaticaly when moved. If you are writing your own
management screens for those operations, though, you could make it all
work, I think.
You could also use ZSchedular to perioducally run the commands to
reindex your site, if instaneous reindexing is not a requirement.
http://www.r4r8.com/
http://www.r4r8.com/vb/
http://www.r4r8.com/hemo1
http://www.f01h.com/
http://www.f01h.com/vb
http://www.f01h.com/chat