Skip to content

Blocks introduced in opendata extension

The main part of the opendata extension is the extra blocks it defines. Below we divide them into standalone and supportive blocks. In most cases it should be enough to use one of the standalone blocks with the supported parameters listed below.

Standalone blocks - views and layouts

The following blocks are stand alone, meaning in most cases it is enough to embed a single one of these on a webpage. You will notice that many of the parameters are the same across these blocks, the reason being that they use different combinations of more underlying supportive blocks. These supportive blocks are listed in the following section.

datasetView

Use this block on a landing page for a dataset. The dataset to show is detected from parameters in the url.

parameter value explanation
hl number the heading level to start with in the block, default is 1
includeExtras boolean include showcases and ideas, default is false
includeVisualizations boolean include visualization, default is false
includeDataPreview boolean include preview of tabular data, default is false
includeIndicators boolean shows indicators, default is false. Indicators only works as expected when run against an EntryScape Registry due to some metadata being cached differently there.
clickExpand boolean click anywhere on distribution row expands the metadata, default is true
registry boolean set to true if the block is used against harvested data in EntryScape Registry to enable improved lookup of filenames

dataserviceView

Use this block on a landing page for a data service. Which data service to show is detected from parameters in the url.

parameter value explanation
hl number the heading level to start with in the block, default is 1
includeIndicators boolean shows indicators, default is false

datasetListLayout

Use this block for an expandable list of datasets.

parameter value explanation
hl number the heading level to start with in the block, default is 1
includeExtras boolean include showcases and ideas, default is false
includeVisualizations boolean include visualization, default is false
includeDataPreview boolean include preview of tabular data, default is false
includeIndicators boolean shows indicators, default is false. Indicators only works as expected when run against an EntryScape Registry due to some metadata being cached differently there.
clickExpand boolean click anywhere on distribution row expands the metadata, default is true
registry boolean set to true if the block is used against harvested data in EntryScape Registry to enable improved lookup of filenames

datasetSimpleSearchLayout

parameter value explanation
hl number the heading level to start with in the block, default is 2
includeExtras boolean include showcases and ideas, default is false
includeVisualizations boolean include visualization, default is false
includeDataPreview boolean include preview of tabular data, default is false

datasetMultiSearchLayout

parameter value explanation
hl number the heading level to start with in the block, default is 2
includeExtras boolean include showcases and ideas, default is false
includeVisualizations boolean include visualization, default is false
includeDataPreview boolean include preview of tabular data, default is false

datasetFacetSearchLayout

parameter value explanation
hl number the heading level to start with in the block, default is 2
includeExtras boolean include showcases and ideas, default is false
includeVisualizations boolean include visualization, default is false
includeDataPreview boolean include preview of tabular data, default is false
break string a width, typically given in pixels that indicates when the two column should be transformed into a single column with a expandable filter in a responsive manner. The default value is 1024px.

datasetFacetSearchPortalLayout

parameter value explanation
hl number the heading level to start with in the block, default is 2
includeDataPreview boolean include preview of tabular data, default is false
includeIndicators boolean shows indicators, default is false
break string a width, typically given in pixels that indicates when the two column should be transformed into a single column with a expandable filter in a responsive manner. The default value is 1024px.

HTML validation

In some cases validation tools will comment on the generated HTML structure. The structure can be slightly changed to avoid the comments. This is done by setting the global parameter strictStandardHtml to true.
As attribute on the data-entryscape-config tag data-strict-standard-html = "true" Or in JSON format for e.g. config handlebar template or config file strictStandarHtml: true

Supportive blocks - used by views and layouts

If your needs cannot be fullfilled with the standalone blocks you can use these supportive blocks to have more complete control. Note that the majority of the standalone blocks are constructed by combining the supportive blocks, for instance if we look at the handlebar template of datasetSimpleSearchLayout:

{{datasetSearch}}{{datasetResults}}{{datasetList includeExtras="inherit" 
  includeVisualizations="inherit" includeDataPreview="inherit" hl="inherit"}}

We see that it uses the datasetSearch, datasetResults and datasetList blocks that are defined below.

Note: many of the blocks below extend a single existing built-in block by providing default parameters for them, if this is the case we indicate this at the start of each block definition below. This will make it easier to look up that block and see which additional parameters that are available. A few blocks are more complicated by utilizing a combination of several blocks, this is accomplished by extending the template block.

datasetSearch

TODO

datasetMultiSearch

TODO

datasetResults

TODO

datasetList

TODO

facets_sv

TODO

facetSearchResponsiveness

TODO

datasetExports

TODO