def getNavTree(self, _marker=None): if _marker is None: _marker = [] context = aq_inner(self.context) # Full nav query, not just the tree for 'this' item queryBuilder = SitemapQueryBuilder(self.data.navigation_root()) query = queryBuilder() strategy = getMultiAdapter((context, self.data), INavtreeStrategy) # Add explicit path to query, since the sitemap query uses the root of # the site nav_root = self.getNavRoot() if nav_root: query['path'] = { 'query': "/".join(nav_root.getPhysicalPath()), 'depth': self.bottomLevel } return buildFolderTree(context, obj=context, query=query, strategy=strategy)
def getNavTree(self, _marker=None): if _marker is None: _marker = [] context = aq_inner(self.context) # Full nav query, not just the tree for 'this' item nav_root = self.getNavRoot() queryBuilder = SitemapQueryBuilder(nav_root) query = queryBuilder() # Add explicit path to query, since the sitemap query uses the root of # the site if nav_root: query['path'] = { 'query': "/".join(nav_root.getPhysicalPath()), 'depth': self.data.get('bottomLevel', 3) } data = dict(self.data) data['root_uid'] = data['root'] strategy = NavtreeStrategy(context, object_factory(**data)) return buildFolderTree(context, obj=context, query=query, strategy=strategy)
def siteMap(self): context = aq_inner(self.context) queryBuilder = SitemapQueryBuilder(context) query = queryBuilder() strategy = getMultiAdapter((context, self), INavtreeStrategy) return buildFolderTree(context, obj=context, query=query, strategy=strategy)
def siteMap(self): context = aq_inner(self.context) queryBuilder = SitemapQueryBuilder(context) query = queryBuilder() # query['review_state'] = 'published' strategy = getMultiAdapter((context, self), INavtreeStrategy) # set correct query path based on context if context.id == "observatory": query['path']['query'] = "/".join(context.getPhysicalPath()) return buildFolderTree( context, obj=context, query=query, strategy=strategy )