Select portlet renderer as named multi-adapter as defined in portlet settings
authorThierry Florac <thierry.florac@onf.fr>
Wed, 28 Jun 2017 10:14:47 +0200
changeset 31 aa6d07b1fab1
parent 30 1e3f8a25ab06
child 32 f9daa4fe49ce
Select portlet renderer as named multi-adapter as defined in portlet settings
src/pyams_portal/views.py
--- a/src/pyams_portal/views.py	Wed Jun 28 10:14:07 2017 +0200
+++ b/src/pyams_portal/views.py	Wed Jun 28 10:14:47 2017 +0200
@@ -50,7 +50,8 @@
     def render_portlet(self, portlet_id):
         settings = self.portlet_configuration.get_portlet_configuration(portlet_id).settings
         renderer = self.request.registry.queryMultiAdapter((self.context, self.request, self, settings),
-                                                           IPortletRenderer)
+                                                           IPortletRenderer,
+                                                           name=settings.renderer)
         if renderer is not None:
             return renderer()
         else: