--- a/src/pyams_content/shared/site/link.py Wed Jun 27 15:15:38 2018 +0200
+++ b/src/pyams_content/shared/site/link.py Wed Jun 27 15:31:57 2018 +0200
@@ -9,6 +9,8 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
+from pyams_skin.layer import IPyAMSUserLayer
+from pyams_utils.interfaces.url import IRelativeURL
__docformat__ = 'restructuredtext'
@@ -83,3 +85,11 @@
target = context.get_target()
if target is not None:
return IWorkflowPublicationInfo(target, None)
+
+
+@adapter_config(context=(IContentLink, IPyAMSUserLayer), provides=IRelativeURL)
+def content_link_relative_url(context):
+ """Content link relative URL"""
+ target = context.get_target()
+ if target is not None:
+ return IRelativeURL(target, None)