Suppose I have an object in /school1/document-rules
.
Suppose in another context, /school2
, I need to have the same document-rules
that is available in /school1/document-rules
.
In ZODB, having /school1/document-rules
and /school2/document-rules
means I have two different objects.
I would like to know if it's possible to make /school2/document-rules
reference /school1/document-rules
. So, /school2/document-rules
would be something like a "ReferenceDocument", "ReferenceLink" or something like a symbolic link that would just point to /school1/document-rules
.
Why? The document is the same, but sometimes it makes more sense (in semantic terms) to have the same document in different contexts. I have portlets that are rendered depending in their context, and I don't want to duplicate document-rules
.
Does something like what I'm looking for exist? Bultin or using a module?
SimpleAlias does what you want. I've used it and it works well. You could also look at collective.alias