Re: [Metapublisher] how to get the Catlog to find MP entries? (2nd post) post)
hi! On Thu, 29 Jun 2000, George Donnelly wrote:
i have several MP instances in subfolders and need to present the most recent mp entries from any/all of the these MP instances on my index_html page in the zope root.
when i add a Z search interface in the zope root it only offers me the Catalog in the zope root as a searchable object and does not seem to be aware of any mp_catalog's.
alternatively i could find all meta entry's to the Catalog in the zope root but the meta entry meta type does not show up in the selection list. how could i find the meta entrys without finding all objects? can anybody recommend an expression? i tried something like meta type==meta entry but this was a no go -- it returned ALL objects
the only way i could do it is by adding each individual mp entry's id into the find to catalog mechanism. for a site with any traffic this could be a major bummer!
hmmm... a little tricky! i found a workaround which looks like this: if you modify the __init__.py of the MetaPublisher product, so that a MetaEntry object appears in a Folder's available objects, obviously ZCatalog will find MetaEntries. I have created an __init__.py which registers MetaEntry objects properly but uses MetaPublisher's constructors. This means, if you select a MetaEntry to add to some Folder, you will actually add a MetaPublisher. This might not be the cleanest solution but it works :) I attached a sample __init__.py file, which you should copy to 'lib/python/Products/MetaPublisher'.
then the next problem was that when i used the getpath directive to get a url for the records returned by the Catalog i got a url like this mpfolder/mp_entries/9995757.435 which plays all kinds of havoc with my carefully crafted directory structure ;-|
depends on your structure... what exactly is the problem? unfortunately, in the current version, the mp_entries folder has to stay. there are early plans to remove it completely but this will take some time before it becomes a reality.
any ideas?
some... ;)
Regards, GEORGE DONNELLY george@cyklotron.com http://cyklotron.com/ The smallest minority on earth is the individual. Those who deny individual rights, cannot claim to be defenders of minorities. --Ayn Rand
_______________________________________________ MetaPublisher mailing list MetaPublisher@beehive.de http://mailman.beehive.de/mailman/listinfo/metapublisher
ciao, basti -------------------------------------------------------------------------- sebastian f. luehnsdorf beehive elektronische medien gmbh -------------------------------------------------------------------------- http://basti.beehive.de http://www.beehive.de mailto:basti@beehive.de mailto:service@beehive.de http://www.zope.de fon: (+49 30) 84 78 20 http://www.i-surf.de fax: (+49 30) 84 78 22 99
participants (1)
-
Sebastian Luehnsdorf