Skip to content

Commit

Permalink
Update theming template docs from group.packages to group.package_count
Browse files Browse the repository at this point in the history
packages is not an attribute on group, but package_count is
  • Loading branch information
mcculleydj committed Mar 3, 2018
1 parent 5fc51e6 commit 3476c68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -19,8 +19,8 @@ <h3>{{ group.display_name }}</h3>
{% else %}
<p>{{ _('This group has no description') }}</p>
{% endif %}
{% if group.packages %}
<strong>{{ ungettext('{num} Dataset', '{num} Datasets', group.packages).format(num=group.packages) }}</strong>
{% if group.package_count %}
<strong>{{ ungettext('{num} Dataset', '{num} Datasets', group.package_count).format(num=group.package_count) }}</strong>
{% else %}
<span>{{ _('0 Datasets') }}</span>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion doc/theming/templates.rst
Expand Up @@ -627,7 +627,7 @@ number of CKAN's template helper functions:

The code also accesses the attributes of each group: ``{{ group.name }}`,
``{{ group.display_name }}``, ``{{ group.description }}``,
``{{ group.packages }}``, etc. To see what attributes a group or any other CKAN
``{{ group.package_count }}``, etc. To see what attributes a group or any other CKAN
object (packages/datasets, organizations, users...) has, you can use
:doc:`CKAN's API </api/index>` to inspect the object. For example to find out what
attributes a group has, call the :py:func:`~ckan.logic.action.get.group_show`
Expand Down

0 comments on commit 3476c68

Please sign in to comment.