--- a/src/pyams_default_theme/shared/site/__init__.py Mon Jan 07 10:05:54 2019 +0100
+++ b/src/pyams_default_theme/shared/site/__init__.py Mon Jan 07 10:08:38 2019 +0100
@@ -16,9 +16,11 @@
from pyams_content.shared.site import IWfSiteTopic
from pyams_content.shared.site.interfaces import ISiteFolder, ISiteManager, ISiteContainer
+from pyams_default_theme.viewlet.breadcrumb import BreadcrumbsAdapter
from pyams_i18n.interfaces import II18n
from pyams_sequence.interfaces import ISequentialIdInfo
from pyams_skin.interfaces.metas import IHTMLContentMetas
+from pyams_skin.interfaces.viewlet import IBreadcrumbs
from pyams_skin.layer import IPyAMSUserLayer
from pyams_skin.metas import ContentMeta, HTMLTagMeta
from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config, ContextRequestAdapter
@@ -57,3 +59,13 @@
self.context.content_url,
'/{}'.format(view_name) if view_name else '.html',
'?{}'.format(query) if query else ''))
+
+
+@adapter_config(context=(IWfSiteTopic, IPyAMSUserLayer, Interface), provides=IBreadcrumbs)
+class SiteTopicBreadcrumbsAdapter(BreadcrumbsAdapter):
+ """Site topic breadcrumbs adapter"""
+
+ @property
+ def items(self):
+ parent = self.context.__parent__
+ yield from self.get_items(parent)