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 > [EMAIL PROTECTED] > 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 > [EMAIL PROTECTED] > 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:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.zope.de fon: (+49 30) 84 78 20 http://www.i-surf.de fax: (+49 30) 84 78 22 99
# ============================================================================= # MetaPublisher 1.0.1b3 - Initialization # ----------------------------------------------------------------------------- # read README.txt for more information or # visit http://www.zope.de/software/MetaPublisher/ # ============================================================================= # ----------------------------------------------------------------------------- # Initialization # ----------------------------------------------------------------------------- __doc__ = '''Product MetaPublisher''' __version__ = '''''' from ImageFile import ImageFile import MetaPublisher import FType import Config import Entry import Container import Interface def initialize(context): """ Initialize all the products defined in this Product distribution. """ try: context.registerClass( MetaPublisher.MetaPublisher, constructors = ( MetaPublisher.manage_addMetaPublisherForm, MetaPublisher.manage_addMetaPublisher, MetaPublisher.manage_getMetaPublisherTypes, ), icon = "images/icon_metapublisher.gif" ) context.registerClass( Entry.MetaEntry, constructors = ( MetaPublisher.manage_addMetaPublisherForm, MetaPublisher.manage_addMetaPublisher, MetaPublisher.manage_getMetaPublisherTypes, ), icon = "images/icon_metapublisher.gif" ) context.registerBaseClass(MetaPublisher.MetaPublisher) context.registerBaseClass(Entry.EntryFolder) context.registerBaseClass(Entry.MetaEntry) except: # throw all exceptions on stderr import sys, traceback, string type, val, tb = sys.exc_info() sys.stderr.write(string.join(traceback.format_exception(type, val, tb), '')) del type, val, tb misc_={ 'EntryFolder': ImageFile('images/icon_entryfolder.gif',globals()), 'MetaEntry': ImageFile('images/icon_metaentry.gif',globals()), 'logo': ImageFile('images/logo.gif',globals()), 'cube': ImageFile('images/cube.gif',globals()), 'clear': ImageFile('images/clear.gif',globals()), 'made_with': ImageFile('images/made_with.gif',globals()), }