This plugin belongs to a set of plugins for the Datenregister – the non-public CKAN instance that is part of Berlin's open data portal daten.berlin.de. ckanext-datasetsnippets provides markup snippets for dataset pages and dataset search. These snippets can be loaded from the data portal's public CMS to handle all requests for datasets.
The plugin implements the following CKAN interfaces:
This plugin has been tested with CKAN 2.9.10 (which requires Python 3).
The Snippet API has the following two endpoints:
This is the search endpoint of the snippet API, which is equivalent to /dataset
in the regular CKAN UI.
Without additional parameters, this returns markup for the paginated list of all datasets.
Parameters (search facets, ordering etc.) can be use to restrict the result.
The parameters are identical to the regular CKAN search parameters.
This is the dataset detail endpoint of the snippet API, which is equivalent to /dataset/<id>
in the regular CKAN UI.
<id>
is the name or id of a dataset.
Both endpoints allow a root_breadcrumb
parameter to set the root element of the breadcrumb returned in the snippets.
The root_breadcrumb
-URL-parameter takes precedence over the datasetsnippets.default_root_breadcrumb
config (see below).
The plugin introduces the following configuration options:
Defines the path component that is prefixed to links that the snippets contain.
In the regular CKAN UI, this would be dataset
, but the site calling the snippet API might require a different path.
datasetsnippets.path = 'datensaetze'
Defines how many datasets are shown per result page in pagination. The option is equivalent to ckan.datasets_per_page, but only applies to the snippets and leaves the regular CKAN UI untouched.
datasetsnippets.datasets_per_page = 10
Defines the string that is used as the root element for the breadcrumb that is part of the returned snippets.
datasetsnippets.default_root_breadcrumb = 'Berlin Open Data'
Defines the url to the datenportal. The url will then be used for generating the feeds using the provided url.
datasetsnippets.datenportal_url = link_to_portal
Defines a string that will be used as a title in the feeds.
datasetsnippets.datenportal_title = 'Berlin Open Data'
This material is copyright © BerlinOnline GmbH.
This extension is open and licensed under the GNU Affero General Public License (AGPL) v3.0. Its full text may be found at: