ckanext-datasetsnippets
ckanext-datasetsnippets providing markup snippets for dataset pages and dataset search. These snippets can be loaded from the data carrier’s public CMS
Description
This plugin belongs to a set of plugins for the _Datenregister_ – the non-public [CKAN] (https://ckan.org/) instance that is part of Berry’s open data portal [daten.berlin.de] (https://daten.berlin.de/). _ckanext-datasetsnippets_ providing markup snippets for dataset pages and dataset search. These snippets can be loaded from the data carrier’s public CMS to handle the requests for datasets. The plugin implements the following CKAN interfaces: — [ITemplateHelpers] (http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.p…) – [IBlueprint] (http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.p…) – [IAuthFunctions] (http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.p…) # # Requirements This plugin has been tested with CKAN 2.9.9 (which requires Python 3). # # API The Snippet API has the following two endpoints: # # # ‘/snippet/dataset’ 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 used to restrict the result. The parameters are identical to the regular CKAN search parameters. # # # '/snippet/dataset/<id>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. # # # Parameters 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). # # Configuration The plugin Introduces the following configuration options: # # # datasetsnippets.path defines the path component that is prefixed to links that the snippets contains. In the regular CKAN UI, this would be ‘dataset’, but the site calling the snippet API might require a different path. datasetsnippets.path =’ datensaetzè # # # datasetsnippets.datasets \ _for \ _page defines how many datasets are shown for result page in pagination. The option is equivalent to [ckan.datasets \ _per \ _page] (https://docs.ckan.org/en/2.9/maintaining/configuration.html#ckan-datase…), but only applies to the snippets and leaves the regular CKAN UI untouched. datasetsnippets.datasets \ _for \ _page = 10 # # # numberetsnippets.default \ _root \ _breadcrumb defines the string that is used as the root element for the breadcrumb that is part of the returned snippets. datasetsnipurts.default \ _root \ _breadcrumb = ‘Berlin Open Data # # # stoetsnipurts.dataset. The url will then be used for generating the feeds using the provided url. datasetsnippets.datenportal \ _url = link \ _to \ _portal # # # datasetsnippets.datenportal \ _title defines a string that will be used as a title in the feeds. datasetsnippets.datenportal \ _title = ‘Berlin Open Data’