getRawRelatedItems
Paul Smith <paul-xN8voSQZb+jemltzdb/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
Hey Gang,
The Related Items field in Plone 2.1 creates a KeywordIndex that
contains a list of hash-y looking strings that represent the
referenced objects.
I'm working on a AT-based content type (a kind-of simple portlet
manager). My users write TTW content for a portlet, then use a
RelatedBrowserWidget to choose where in the site the portlet should
go. I've added a KeywordIndex to the RelatedBrowserWidget field
(which I call Placement), so now I have a getRawPlacement index in my
catalog that has those same hash strings.
Now I've written a portlet that shows up on every page. It looks
in the catalog for any of my users' portlet-oids that should appear
on the current page. I'd like to write a query that only returns the
items that match the current context, and barring that, I'd like to
be able to find matches from brains' getRawPlacement without having
to wake up all the objects.
So. Does anybody know where those strings come from? Can I do
something with 'context' to see if it corresponds to one of the
strings in my getRawPlacement index?
--P
Paul Smith
paul-xN8voSQZb+jemltzdb/[email protected]
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click