Malthe Borch wrote:
However, trying to get the absolute url of the resource fails, and it seems to be an acquisition-wrapping thing.

FWIW, this adapter will do the trick, although it's hardly a solid solution:

  class SimpleResourceAbsoluteURL(object):
      interface.implements(
          zope.traversing.browser.interfaces.IAbsoluteURL)
      component.adapts(
          Products.Five.browser.resource.DirectoryResource,
          zope.publisher.interfaces.browser.IDefaultBrowserLayer)

      def __init__(self, context, request):
          self.context = context

      def __str__(self):
          return self.context()

\malthe

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to