def folder_view(context, request): template = context.template() if context.custom_view: template = context.custom_view default_content = None result = "" alt_body = "" logging.info('Original folder_view') if context.default_content and context.default_content in context.contentNames( ): default_content = context[context.default_content] alt_body = render_template('replaceable_body.pt', request=request, context=default_content, template_name=default_content.template()) result = render_template_to_response(template, request=request, context=context, alt_body=alt_body) return result
def folder_view(context, request): template = context.template() if context.custom_view: template = context.custom_view default_content = None result = "" alt_body = "" logging.info('Original folder_view') if context.default_content and context.default_content in context.contentNames(): default_content=context[context.default_content] alt_body = render_template('replaceable_body.pt', request = request, context = default_content, template_name = default_content.template() ) result = render_template_to_response(template, request = request, context = context, alt_body = alt_body ) return result
def __call__(self): template = self.template if self.portlet.portlet_template: template = self.portlet.portlet_template return render_template(template, request=self.request, context=self.context, portlet=self.portlet, view=self, root=self.root)