[ckan-dev] Display showcase on front page

Mike Sinclair mm.sinclair08 at gmail.com
Wed Feb 24 07:11:52 UTC 2016


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/20160223/3db7faff/attachment-0002.html>


More information about the ckan-dev mailing list