Le 18 févr. 2011 à 01:49, Laurence Rowe a écrit : > > > Gilles Lenfant-2 wrote: >> >> Hi, >> >> I know we should not make the URL to a content like this: >> >> url = item.absolute_url() >> >> This does not work for files, images, and perhaps other third party >> content types which "absolute_url()" is the download URL and not a regular >> Plone view page URL. >> >> The workaround I found is somehow noisy (but works as expected) : >> >> from zope.component import getMultiAdapter >> ... >> content_view = getMultiAdapter((item, request), >> name=u'plone_context_state') >> url = content_view.view_url() >> >> Is there something that's less verbose around ? >> > > We already have an @@absolute_url. Perhaps we need an @@view_url?
vote += 1 > > Laurence > -- > View this message in context: > http://plone.293351.n2.nabble.com/URL-to-content-view-tp6028204p6038269.html > Sent from the Product Developers mailing list archive at Nabble.com. > _______________________________________________ > Product-Developers mailing list > [email protected] > https://lists.plone.org/mailman/listinfo/product-developers _______________________________________________ Product-Developers mailing list [email protected] https://lists.plone.org/mailman/listinfo/product-developers
