[ckan-dev] Display showcase on front page

Mike Sinclair mm.sinclair08 at gmail.com
Fri Feb 26 07:31:09 UTC 2016


In case anyone sees this thread later...

It's just that showcase_list want's packages not related_items - missed
that.
{% snippet 'showcase/snippets/showcase_list.html',
packages=h.get_showcase_items()
%}
ᐧ

On Wed, Feb 24, 2016 at 12:59 AM, Mike Sinclair <mm.sinclair08 at gmail.com>
wrote:

> 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/20160225/a73e9807/attachment-0003.html>


More information about the ckan-dev mailing list