[Zope] Setting and retrieving a list of linked objects

Pablo Ziliani pablo@decode.com.ar
Sun, 23 Sep 2001 20:38:01 -0300


Hi people,

My problem is this:
I have a ZClass "article". I=B4m trying to make each article instance sho=
w a
menu list of "related articles" that will display the title of each targe=
t
instance as the link to it.
i.e.:
<p>Related articles</p>
  <a href=3D"www.mysite.com/path_to/article1">Article One's  Title</a><br=
>
  <a href=3D"www.mysite.com/other/path_to/another/article1">Another Artic=
le
One's Title</a><br>
  <a href=3D"www.mysite.com/other/path_to/article2">Article Two's
Title</a><br>

Problems:
- I don't want the link being the target article's path stored in a varia=
ble
as it will be easily broken (and I will have to learn how to retrieve an
object's property out of its path, anyway).
- I can't simply store the id of the object as this object may not be fou=
nd
in the acquisition path and it might be duplicated, so I will need to sto=
re
its context too.

Any idea?

PS.: OK, let's make an unique id for each instance, if this helps.