def init_resource(self, **kw): if 'add_boxes' in kw: add_boxes = kw.get('add_boxes') del kw['add_boxes'] else: add_boxes = True SideBarAware.init_resource(self, **kw) ContentBarAware.init_resource(self, **kw) ResourcesOrderedContainer.init_resource(self, **kw) # Preorder items if kw.get('add_boxes', True) is True: site_root = self.get_site_root() language = site_root.get_property('website_languages')[0] repository = self.get_site_root().get_repository() sidebar_table = self.get_resource(self.sidebar_name) # tags cloud (created by repository) sidebar_table.add_new_record({'name': repository.tags_box}) # TOC box_cls = ContentBoxSectionChildrenToc self.make_resource('toc', box_cls, title={language: box_cls.class_title.gettext()}) contentbar_table = self.get_resource(self.contentbar_name) contentbar_table.add_new_record({'name': 'toc'})
def get_catalog_values(self): return merge_dicts(ResourcesOrderedContainer.get_catalog_values(self), TagsAware.get_catalog_values(self), SideBarAware.get_catalog_values(self), ContentBarAware.get_catalog_values(self))