188 use_portlets_cache = True |
188 use_portlets_cache = True |
189 use_authentication = False |
189 use_authentication = False |
190 |
190 |
191 weight = 0 |
191 weight = 0 |
192 |
192 |
|
193 resources = () |
|
194 |
193 @property |
195 @property |
194 def slot_configuration(self): |
196 def slot_configuration(self): |
195 template = IPortalPage(self.context).template |
197 template = IPortalPage(self.context).template |
196 config = IPortalTemplateConfiguration(template) |
198 config = IPortalTemplateConfiguration(template) |
197 slot_id, slot_name = config.get_portlet_slot(self.settings.configuration.portlet_id) |
199 slot_id, slot_name = config.get_portlet_slot(self.settings.configuration.portlet_id) |
198 return config.get_slot_configuration(slot_name) |
200 return config.get_slot_configuration(slot_name) |
199 |
201 |
200 @property |
202 @property |
201 def renderer_settings(self): |
203 def renderer_settings(self): |
202 return IPortletRendererSettings(self.settings) |
204 return IPortletRendererSettings(self.settings) |
|
205 |
|
206 def update(self): |
|
207 super(PortletRenderer, self).update() |
|
208 for resource in self.resources: |
|
209 resource.need() |
203 |
210 |
204 def render(self): |
211 def render(self): |
205 preview_mode = self.request.annotations.get(PREVIEW_MODE, False) |
212 preview_mode = self.request.annotations.get(PREVIEW_MODE, False) |
206 if preview_mode or not self.use_portlets_cache: |
213 if preview_mode or not self.use_portlets_cache: |
207 return super(PortletRenderer, self).render() |
214 return super(PortletRenderer, self).render() |