def render(self, context): """ Three block groups are fetched separately and rendered in increasing priority: - site blocks (no content) - section related blocks - content related blocks """ request = context.get('request', None) try: content = context.get('content', None) section = context.get('section', None) blocks = get_all_blocks_to_display(self.place, content, section) result = _render_blocks(request, blocks, content, section, self.place, "block", self.nondraggable, context, self.noncontained) return result except template.VariableDoesNotExist: return ''
def get_rendered_blocks(place=None, content=None, section=None): blocks = get_all_blocks_to_display(place, content, section) return [ reg_block.get_registry_item().render(None, None, None) for reg_block in blocks ]
def get_rendered_blocks(place=None, content=None, section=None): blocks = get_all_blocks_to_display(place, content, section) return [reg_block.get_registry_item().render(None, None, None) for reg_block in blocks]