[ckan-dev] Organization hierarchy

lucia.espona at wsl.ch lucia.espona at wsl.ch
Tue Aug 9 10:51:27 UTC 2016


Hi Stefan

Many thanks for your answer, I will start trying to implement a "before_index" and add a field to contain all the upstream organizations. In principle the organizational structure should be fixed but I am afraid how changes will affect the indexed datasets. For example if a children organization moves to other parent, one should change the contents of that field in every dataset and re-index it, maybe this already happens automatically.

In addition to the facets, I want that the organization hierarchy is shown in the breadcrumb navigation (ex. home/organizations/parent/child) and in the page of every organization if available, the children organizations and their datasets.

Best,
Lucia

 _________________________________________________________
Dr. Lucia Espona Pernas

Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 739 28 71 phone direct
+41 44 739 21 11 reception

www.wsl.ch

-----"ckan-dev" <ckan-dev-bounces at lists.okfn.org> wrote: -----
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
From: Stefan Oderbolz 
Sent by: "ckan-dev" 
Date: 09.08.2016 09:30
Subject: Re: [ckan-dev] Organization hierarchy

Hi Lucia,

we used ckanext-hierarchy for opendata.swiss as well. All you have to do is to override the organization_tree.html template and add your customization. For the Swiss portal, we had to make sure, that the organizations are translated correctly (you can find the code here: https://github.com/ogdch/ckanext-switzerland/blob/master/ckanext/switzerland/templates/organization/snippets/organization_tree.html).


As for your problem of datasets belonging to multiple organizations: this is a rather hard problem. To enable this is CKAN core would require to rewrite a lot of code, as the authorization is connected to organization (i.e. as a member of an organization, you can edit its datasets). If this is more a display issue, I'd suggest to tweak the Solr index. The package controller interface has a method "before_index" that you can use to do this (see http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IPackageController.before_index). I would probably create a new field where you can save all organizations. In the end this shouldn't be hard, as it already works for groups and under the hood organizations are implemented as groups.

I'd be very interested in this kind of improvement, as this is a requirement we might encounter as well.

Best Regards Stefan

On Mon, Aug 8, 2016 at 8:04 PM,  <lucia.espona at wsl.ch> wrote:
 Hi everyone,

I would like to have a hierarchical structure for my organizations so I used the extension https://github.com/datagovuk/ckanext-hierarchy. 

I plan to improve the display, that seems an easy task but if someone has already done some work I will be very grateful if it can be shared with me.

I also would like that the datasets from one organization also belong to the parent one. For example, I want that when you filter the datasets on the facets by one organization, all the datasets belonging to its children appear.

Any hints how to achieve this? One solution would be to allow datasets to belong to more than one organization, alternatively I guess one could configure the indexing for Solr.

Many thanks in advance for your help.  

Best,
Lucia

_________________________________________________________
Dr. Lucia Espona Pernas

Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 739 28 71 phone direct
+41 44 739 21 11 reception

www.wsl.ch
_______________________________________________
 ckan-dev mailing list
 ckan-dev at lists.okfn.org
 https://lists.okfn.org/mailman/listinfo/ckan-dev
 Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
 



-- 
Liip AG  // Limmatstrasse 183 //  CH-8005 Zürich
Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
  
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160809/df2f84d1/attachment-0003.html>


More information about the ckan-dev mailing list