Giter VIP home page Giter VIP logo

Comments (3)

pdekraker-epa avatar pdekraker-epa commented on July 28, 2024 2

If you have more than 20, but not a ton I do have a workaround:

The underlying issue is that the organization list display controller (in base ckan) is set to return a specified number of items per page. It searches and finds the matching organizations (limited to 21 items per page) and passes them to the hierarchy plugin to display. The hierarchy plugin then tries to build the tree, but it is missing pieces because of the per page limit.

The easiest solution is to edit the CKAN group controller here to be a number larger than your number of organizations:
https://github.com/ckan/ckan/blob/197f9b19254dad3056d1418d4bbfc5c604b39c4e/ckan/controllers/group.py#L144

FYI, It looks like future versions of CKAN will use the datasets_per_page config variable to determine the limit.

from ckanext-hierarchy.

clauded avatar clauded commented on July 28, 2024

Is there a work around for this as I have the same problem?

from ckanext-hierarchy.

clauded avatar clauded commented on July 28, 2024

Thanks for the tip but when you think about it, pagination don't make sens with this module as it will always break the display of the tree.

I tried to use the following in templates/organization/index.html of the ckan core module:
{% snippet "organization/snippets/organization_list.html", organizations=organizations, show_capacity=True %}

This will display the whole tree. Unfortunatly, when I use search, highlight of results dont work. So for the moment, your solution works better but I'm sure it can be fixed in this module.

from ckanext-hierarchy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.