[ckan-dev] Display showcase on front page

Mike Sinclair mm.sinclair08 at gmail.com
Wed Feb 24 08:59:09 UTC 2016


I'm definitely missing the context, but not sure how to get it from another
extension,,,

On Tue, Feb 23, 2016 at 11:11 PM, Mike Sinclair <mm.sinclair08 at gmail.com>
wrote:

> Hi guys,
>
> I'm trying to do something pretty simple but I must be missing something...
>
> I would like to display the showcase list on the front page, however it's
> just and empty <!-- Snippet showcase/snippets/showcase_list.html start -->
>
>
> *In my plugin.py:*
> def get_showcase_items():
>     showcase = toolkit.get_action('ckanext_showcase_list')(
>         data_dict={})
>
>     showcase = showcase[:10]
>
>     return showcase
>
> def get_helpers(self):
>      return {'get_showcase_items': get_showcase_items}
>
> *in my main page*
> {% block showcase %}
>  {% snippet 'showcase/snippets/showcase_list.html',
> related_items=h.get_showcase_items() %}
> {% endblock %}
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160224/72784e0c/attachment-0003.html>


More information about the ckan-dev mailing list