i have read the two messages about Soft Link, and i tried to work with it,
because it it very important for my Product.
The problem is that the Soft Link class won't work and i don't know why.
I use zope 2.2.2 and python 1.5.2.
-SoftLink to testdtmldoc
In myproduct i have the following function, the class SoftLink is the same
as of Shane Hathaway.
I wan't to add a SoftLink in myproductfolder which links to testdtmldoc.
When i call the function manage_addSoftLink nothing happens??
def manage_addSoftLink(self, REQUEST=None):
Whats going wrong, or did i missunderstand something?
Who can help?
Shane Hathaway schrieb:
> Try this. I failed to account for the fact that sometimes the object is
> not in context and therefore the linked object will not be found.
> def __of__(self, parent):
> ob = self.restrictedTraverse(self.path)
> # We're not in context or the object was not found. Default to
> return self
> return getattr(ob, 'aq_base', ob).__of__(parent)
> Keep in mind, though, that there are all kinds of security
> implications. Someone will have to think hard about security before
> this is viable.
> OTOH perhaps it's really simple. Try this as the last line instead:
> return getattr(ob, 'aq_inner', ob).__of__(parent)
> This way, the security context might be retained. If it doesn't work,
> try changing the last line to:
> return ob.__of__(parent)
> Zope-Dev maillist - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope )
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -