src/source/howto-portlet.rst
branchdoc-dc
changeset 69 92e33e6b9e92
parent 58 7e5e72ddeeb2
child 75 5cf9c8a16aee
equal deleted inserted replaced
68:de025ff8ba30 69:92e33e6b9e92
   158 given portlet by given distinct names to the adapters:
   158 given portlet by given distinct names to the adapters:
   159 
   159 
   160 .. code-block:: python
   160 .. code-block:: python
   161 
   161 
   162     @adapter_config(name='another-renderer',
   162     @adapter_config(name='another-renderer',
   163                     context=(IPortalContext, IPyAMSLayer, Interface, INewPortletSettings), provides=IPortletRenderer)
   163                     context=(IPortalContext, IPyAMSLayer, Interface, INewPortletSettings),
       
   164                     provides=IPortletRenderer)
   164     @template_config(template='my-portlet-render-2.pt', layer=IPyAMSLayer)
   165     @template_config(template='my-portlet-render-2.pt', layer=IPyAMSLayer)
   165     class AnotherNewPortletRenderer(PortletRenderer):
   166     class AnotherNewPortletRenderer(PortletRenderer):
   166         """Another new portlet renderer"""
   167         """Another new portlet renderer"""
   167 
   168 
   168         label = _("Another comment renderer")
   169         label = _("Another comment renderer")
       
   170 
       
   171 .. tip::
       
   172     You can use an other template without create a new renderer component,
       
   173     with :py:func:`pyams_utils` to override the default template with you own.