Example #1
0
 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 ''
Example #2
0
 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 ''
Example #3
0
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
    ]
Example #4
0
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]