[ckan-dev] most popular groups in our own theme.

Judith Moran Judith.Moran at nt.gov.au
Fri Apr 26 06:56:39 UTC 2019


Hi,

I am following the example in 2.8.2 guide for the above.

https://docs.ckan.org/en/2.8/theming/templates.html?highlight=ckan.common

Adding your own template helper functions


I have successfully updated the plugin.py with the additions..... some syntax errors on indents but fixed them from the error log.

Now when I add the simple code below.....  I get "Server Error"

The previous developer bypassed layout1.html and is using ONLY index.html to generate the home page.
Does this make it any difference to adding the code into index.html instead of layout1.html??




{% block featured_organization %}

  {# Show a list of the site's most popular groups. #}
  <h3>Most popular groups</h3>
  <ul>
    {% for group in h.example_theme_most_popular_groups() %}
      <li>{{ group.display_name }}</li>
    {% endfor %}
  </ul>

{% endblock %}

Anyone got any suggestions...

Thx

Judy.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190426/66f45b47/attachment.html>


More information about the ckan-dev mailing list