Hi,
I am using page-footer template hook from a plugin to add additional links in the footer.
class MLZThemesPlugin(IndicoPlugin):
"""MLZ Themes
Provides event themes for MLZ.
"""
...
def init(self):
super(MLZThemesPlugin, self).init()
...
self.connect(signals.plugin.template_hook, self._get_template_hooks)
self.template_hook_map = {
'page-footer':self._render_page_footer,
}
....
def _get_template_hooks(self, sender, **kwargs):
"""renderers should return a ``(is_markup, priority, value)`` tuple."""
renderer = self.template_hook_map.get(sender)
if renderer:
return renderer()
def _render_page_footer(self):
return TemplateSnippet(
'<div style="margin-left: 1em;margin-right: 1em; float: right;">'
'<a href="https://mlz-garching.de/startseite/datenschutz.html">Datenschutz am MLZ</a>'
'</div>'
'<div style="margin-left: 1em;margin-right: 1em; float: right;">'
'<a href="https://mlz-garching.de/startseite/impressum.html">Impressum</a>'
'</div>'
,markup=True, priority=50)
The template does call the hook with ‘as_list=True’, but all attempts to return more than one item from the plugin failed .
I tried yielding more than one Snippet, makeing the content of the snippet a list or returning a list of Snippets.
Is it at all possible to return more than one item here?
Björn