Commit 66317312 authored by Vincent Pelletier's avatar Vincent Pelletier

Add automatic lookup for custom ListBox rendering page template.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11694 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ea44e94c
...@@ -2100,9 +2100,8 @@ class ListBoxHTMLRenderer(ListBoxRenderer): ...@@ -2100,9 +2100,8 @@ class ListBoxHTMLRenderer(ListBoxRenderer):
except AttributeError: except AttributeError:
return getattr(context.getPortalObject(), method_id).__of__(context) return getattr(context.getPortalObject(), method_id).__of__(context)
return aq_base(getattr(self.getContext(), method_id)).__of__(context) return aq_base(getattr(self.getContext(), method_id)).__of__(context)
# Try to get a page template from acquisition and fallback on default page template.
# Otherwise, use the default one. return getattr(context.getPortalObject(), 'ListBox_asHTML', context.asHTML).__of__(context)
return context.asHTML.__of__(context)
def render(self, **kw): def render(self, **kw):
"""Render the data in HTML. """Render the data in HTML.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment