Added check against illustration renderer without position (Cf 'hidden' renderer)
authorThierry Florac <thierry.florac@onf.fr>
Tue, 09 Oct 2018 08:59:35 +0200
changeset 173 6d264d462192
parent 172 dc05ad847d02
child 174 9264287735a6
Added check against illustration renderer without position (Cf 'hidden' renderer)
src/pyams_default_theme/component/paragraph/templates/html-default.pt
--- a/src/pyams_default_theme/component/paragraph/templates/html-default.pt	Mon Oct 08 17:11:12 2018 +0200
+++ b/src/pyams_default_theme/component/paragraph/templates/html-default.pt	Tue Oct 09 08:59:35 2018 +0200
@@ -1,5 +1,5 @@
 <tal:var define="renderer view.illustration_renderer;
-				 position renderer.position if renderer is not None else None;"
+				 position getattr(renderer, 'position', None) if renderer is not None else None;"
 		 switch="position">
 	<tal:var case="'before-title'">${structure:view.render_illustration()}</tal:var>
 	<h2 tal:condition="view.title and (position != 'before-title')">${view.title}</h2>