--- a/src/pyams_default_theme/component/paragraph/__init__.py Mon Aug 27 11:31:05 2018 +0200
+++ b/src/pyams_default_theme/component/paragraph/__init__.py Mon Aug 27 11:31:27 2018 +0200
@@ -40,8 +40,12 @@
def update(self):
super(ParagraphPreviewPage, self).update()
- self.renderer.language = self.language
- self.renderer.update()
+ if self.renderer is not None:
+ self.renderer.language = self.language
+ self.renderer.update()
def render(self):
- return self.renderer.render()
+ if self.renderer is not None:
+ return self.renderer.render()
+ else:
+ return ''
--- a/src/pyams_default_theme/component/paragraph/header.py Mon Aug 27 11:31:05 2018 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2008-2017 Thierry Florac <tflorac AT ulthar.net>
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-
-__docformat__ = 'restructuredtext'
-
-
-# import standard library
-
-# import interfaces
-from pyams_content.component.paragraph.interfaces.header import IHeaderParagraph
-from pyams_content.features.renderer.interfaces import IContentRenderer
-from pyams_skin.layer import IPyAMSLayer
-
-# import packages
-from pyams_content.features.renderer.skin import BaseContentRenderer
-from pyams_template.template import template_config
-from pyams_utils.adapter import adapter_config
-
-from pyams_default_theme import _
-
-
-#
-# Header paragraph default renderer
-#
-
-@adapter_config(name='default', context=(IHeaderParagraph, IPyAMSLayer), provides=IContentRenderer)
-@template_config(template='templates/header-default.pt', layer=IPyAMSLayer)
-class HeaderParagraphDefaultRenderer(BaseContentRenderer):
- """Header paragraph default renderer"""
-
- label = _("Default header renderer")
-
- i18n_context_attrs = ('header', )
--- a/src/pyams_default_theme/component/paragraph/templates/header-default.pt Mon Aug 27 11:31:05 2018 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<div class="strong margin-bottom-10"
- tal:content="structure tales:html(view.header)">header</div>