[Zope] Re: [Metapublisher] how to get the Catlog to find MP entries? (2nd post) post)

Sebastian Luehnsdorf sfl@beehive.de
Mon, 17 Jul 2000 18:47:45 +0200 (CEST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---1463811583-2035023611-963852465=:30606
Content-Type: TEXT/PLAIN; charset=US-ASCII

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


---1463811583-2035023611-963852465=:30606
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="__init__.py"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.21.0007171847450.30606@queenbee.intern.beehive.de>
Content-Description: __init__.py
Content-Disposition: attachment; filename="__init__.py"

IyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0NCiMgICAgICAg
TWV0YVB1Ymxpc2hlciAxLjAuMWIzIC0gSW5pdGlhbGl6YXRpb24NDQojIC0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQ0KIyAgICAgICByZWFk
IFJFQURNRS50eHQgZm9yIG1vcmUgaW5mb3JtYXRpb24gb3INDQojICAgICAg
IHZpc2l0IGh0dHA6Ly93d3cuem9wZS5kZS9zb2Z0d2FyZS9NZXRhUHVibGlz
aGVyLw0NCiMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NDQoN
DQojIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQ0KIyAgICAg
ICBJbml0aWFsaXphdGlvbg0NCiMgLS0tLS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