diff --git a/src/components/document-list/_macro-options.md b/src/components/document-list/_macro-options.md index b0201f65cc..900fab0492 100644 --- a/src/components/document-list/_macro-options.md +++ b/src/components/document-list/_macro-options.md @@ -12,8 +12,7 @@ | ----------- | ------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | classes | string | false | Custom classes to add to each document list item | | attributes | object | false | HTML attributes (for example, data attributes) to add to each document list item | -| title | string | true | The title for the document | -| url | string | true | The URL for the document link (either a file or web page) | +| title | `Object` | true | An object containing text and url of the [title](#title) | | description | string | false | A short HTML extract of text (for example, a short sentence to give some context of the document) | | thumbnail | `Object<Thumbnail>` | false | An object containing path and filename attributes for the [thumbnail image](#thumbnail). Renders a placeholder instead if set to `true` | | metadata | `Object<Metadata>` | false | An object for a [list of information about document](#metadata), for example, date, type and size | @@ -30,13 +29,13 @@ ### Metadata -| Name | Type | Required | Description | -| ---- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------- | -| type | `<Object>Type` | false | An object for a list item describing the [type of document](#type), for example, “Dataset” or “Press release” | -| date | `<Object>Date` | false | An object for the [date](#date) the document was published or updated | -| file | `<Object>File` | false | An object to describe the [details of the downloadable file](#file) such as format and size | +| Name | Type | Required | Description | +| ------ | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------- | +| object | `Object<Object>` | false | An object for a list item describing the [type of document](#object), for example, “Dataset” or “Press release” | +| date | `Object<Date>` | false | An object for the [date](#date) the document was published or updated | +| file | `Object<File>` | false | An object to describe the [details of the downloadable file](#file) such as format and size | -#### Type +#### Object | Name | Type | Required | Description | | ---- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------- | @@ -60,3 +59,10 @@ | fileType | string | true | Format of the file, for example, PDF, DOC, XLS | | fileSize | string | true | Size of the file in megabytes or kilobytes, for example, “850KB” | | filePages | string | false | Number of pages in the file, for example, “16 pages” | + +#### Title + +| Name | Type | Required | Description | +| ---- | ------ | -------- | --------------------------------------------------------- | +| text | string | true | The title for the document | +| url | string | true | The URL for the document link (either a file or web page) | diff --git a/src/components/document-list/_macro.njk b/src/components/document-list/_macro.njk index 40a89a04fa..12d9567161 100644 --- a/src/components/document-list/_macro.njk +++ b/src/components/document-list/_macro.njk @@ -15,7 +15,7 @@ > <a class="ons-document-list__image-link{{ ' ons-document-list__image-link--placeholder' if not document.thumbnail.smallSrc }}" - href="{{ document.url }}" + href="{{ document.title.url }}" tabindex="-1" > {% if document.thumbnail.smallSrc and document.thumbnail.largeSrc %} @@ -35,8 +35,8 @@ class="ons-document-list__item-header{{ ' ons-document-list__item-header--reverse' if document.showMetadataFirst == true }}" > {{ openingTag | safe }} class="ons-document-list__item-title ons-u-fs-m ons-u-mt-no ons-u-mb-xs"> - <a href="{{ document.url }}" - >{{ document.title }} + <a href="{{ document.title.url }}" + >{{ document.title.text }} {%- if document.metadata and document.metadata.file -%} <span class="ons-u-vh"> {% @@ -63,23 +63,23 @@ </li> {% endif %} - {%- if document.metadata.type and document.metadata.type.text -%} + {%- if document.metadata.object and document.metadata.object.text -%} <li class="ons-document-list__item-attribute{{ ' ons-u-mr-no' if document.metadata.file }}"> - {% set metadataType %} + {% set metadataObject %} <span - {% if not document.metadata.file and not document.metadata.type.url %}class="ons-u-fw-b"{% endif %} - >{{ document.metadata.type.text }}{%- if document.metadata.type.ref -%}:{% elif document.metadata.file %},{% endif %}</span + {% if not document.metadata.file and not document.metadata.object.url %}class="ons-u-fw-b"{% endif %} + >{{ document.metadata.object.text }}{%- if document.metadata.object.ref -%}:{% elif document.metadata.file %},{% endif %}</span > {% endset %} - {%- if document.metadata.type.url -%} - <a class="ons-document-list__attribute-link" href="{{ document.metadata.type.url }}"> - {{ metadataType | safe }} + {%- if document.metadata.object.url -%} + <a class="ons-document-list__attribute-link" href="{{ document.metadata.object.url }}"> + {{ metadataObject | safe }} </a> {% else %} - {{ metadataType | safe }} + {{ metadataObject | safe }} {% endif %} - {%- if document.metadata.type.ref -%} - <span>{{ document.metadata.type.ref }}</span> + {%- if document.metadata.object.ref -%} + <span>{{ document.metadata.object.ref }}</span> {% endif %} </li> {% endif %} diff --git a/src/components/document-list/_macro.spec.js b/src/components/document-list/_macro.spec.js index d382751cf2..2701bd07c2 100644 --- a/src/components/document-list/_macro.spec.js +++ b/src/components/document-list/_macro.spec.js @@ -6,8 +6,10 @@ import axe from '../../tests/helpers/axe'; import { renderComponent } from '../../tests/helpers/rendering'; const EXAMPLE_DOCUMENT_LIST_BASIC = { - url: '#0', - title: 'Crime and justice', + title: { + text: 'Crime and justice', + url: '#0', + }, description: 'Some description', }; @@ -30,10 +32,10 @@ const EXAMPLE_DOCUMENT_LIST_WITH_METADATA_FILE = { }, }; -const EXAMPLE_DOCUMENT_LIST_WITH_METADATA_TYPE = { +const EXAMPLE_DOCUMENT_LIST_WITH_METADATA_OBJECT = { ...EXAMPLE_DOCUMENT_LIST_BASIC, metadata: { - type: { + object: { text: 'Poster', url: '#0', ref: 'some ref', @@ -49,7 +51,7 @@ const EXAMPLE_DOCUMENT_LIST_WITH_MULTIPLE = { largeSrc: '/example-large.png', }, metadata: { - type: { + object: { text: 'Poster', url: '#0', ref: 'some ref', @@ -256,11 +258,11 @@ describe('macro: document list', () => { }); }); - describe('mode: with metadata `type` configuration', () => { + describe('mode: with metadata `object` configuration', () => { it('passes jest-axe checks', async () => { const $ = cheerio.load( renderComponent('document-list', { - documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_TYPE], + documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_OBJECT], }), ); @@ -271,7 +273,7 @@ describe('macro: document list', () => { it('has the provided `url`', () => { const $ = cheerio.load( renderComponent('document-list', { - documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_TYPE], + documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_OBJECT], }), ); @@ -280,13 +282,13 @@ describe('macro: document list', () => { }); it('has expected `text`', () => { - const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_TYPE] })); + const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_OBJECT] })); const text = $('.ons-document-list__attribute-link > span').text().trim(); expect(text).toBe('Poster:'); }); it('has expected `ref`', () => { - const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_TYPE] })); + const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_OBJECT] })); const text = $('.ons-document-list__attribute-link + span').text().trim(); expect(text).toBe('some ref'); }); diff --git a/src/components/document-list/example-document-list-article-featured.njk b/src/components/document-list/example-document-list-article-featured.njk index d1aa536c5e..40f5e97211 100644 --- a/src/components/document-list/example-document-list-article-featured.njk +++ b/src/components/document-list/example-document-list-article-featured.njk @@ -14,10 +14,12 @@ "smallSrc": '/img/small/census-monuments-lights-featured.jpg', "largeSrc": '/img/large/census-monuments-lights-featured.jpg' }, - "url": '#0', - "title": 'Landmarks are lighting up purple to mark Census Day', + "title": { + "text": 'Landmarks are lighting up purple to mark Census Day', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, diff --git a/src/components/document-list/example-document-list-articles.njk b/src/components/document-list/example-document-list-articles.njk index 494ad0596c..0e12376c0a 100644 --- a/src/components/document-list/example-document-list-articles.njk +++ b/src/components/document-list/example-document-list-articles.njk @@ -8,10 +8,12 @@ "smallSrc": '/img/small/census-monuments-lights.jpg', "largeSrc": '/img/large/census-monuments-lights.jpg' }, - "url": '#0', - "title": 'Landmarks are lighting up purple to mark Census Day', + "title": { + "text": 'Landmarks are lighting up purple to mark Census Day', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -27,10 +29,12 @@ "smallSrc": '/img/small/ons-award-winners.jpg', "largeSrc": '/img/large/ons-award-winners.jpg' }, - "url": '#0', - "title": 'Office for National Statistics win top Royal Statistical Society award', + "title": { + "text": 'Office for National Statistics win top Royal Statistical Society award', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -43,10 +47,12 @@ }, { "thumbnail": true, - "url": '#0', - "title": 'Five Office for National Statistics names in New Year’s Honours', + "title": { + "text": 'Five Office for National Statistics names in New Year’s Honours', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, diff --git a/src/components/document-list/example-document-list-downloads.njk b/src/components/document-list/example-document-list-downloads.njk index 2b8201e5fe..1e34719579 100644 --- a/src/components/document-list/example-document-list-downloads.njk +++ b/src/components/document-list/example-document-list-downloads.njk @@ -4,10 +4,12 @@ "documents": [ { "thumbnail": true, - "url": '#', - "title": 'Including everyone in Census 2021', + "title": { + "text": 'Including everyone in Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Poster' }, "file": { @@ -20,10 +22,12 @@ }, { "thumbnail": true, - "url": '#', - "title": 'Community handbook for Census 2021', + "title": { + "text": 'Community handbook for Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Booklet' }, "file": { @@ -36,10 +40,12 @@ }, { "thumbnail": true, - "url": '#', - "title": 'Census 2021 matters to everyone', + "title": { + "text": 'Census 2021 matters to everyone', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Poster' }, "file": { diff --git a/src/components/document-list/example-document-list-search-result-featured.njk b/src/components/document-list/example-document-list-search-result-featured.njk index 41016a8167..c48ca5fc27 100644 --- a/src/components/document-list/example-document-list-search-result-featured.njk +++ b/src/components/document-list/example-document-list-search-result-featured.njk @@ -6,10 +6,12 @@ { "featured": true, "showMetadataFirst": true, - "url": '#0', - "title": 'Crime and justice', + "title": { + "text": 'Crime and justice', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Topic' } }, diff --git a/src/components/document-list/example-document-list-search-results.njk b/src/components/document-list/example-document-list-search-results.njk index 9b97873b0a..258a410832 100644 --- a/src/components/document-list/example-document-list-search-results.njk +++ b/src/components/document-list/example-document-list-search-results.njk @@ -6,10 +6,12 @@ { "featured": true, "showMetadataFirst": true, - "url": '#0', - "title": 'Crime and justice', + "title": { + "text": 'Crime and justice', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Topic' } }, @@ -17,10 +19,12 @@ <p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>' }, { - "url": '#0', - "title": 'Disability and crime', + "title": { + "text": 'Disability and crime', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Dataset' }, "date": { @@ -33,10 +37,12 @@ "description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <mark>Crime</mark> Survey for England and Wales (CSEW) data.</p>' }, { - "url": '#0', - "title": 'Disability and crime, UK: 2019 (Latest release)', + "title": { + "text": 'Disability and crime, UK: 2019 (Latest release)', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Statistical bulletin' }, "date": { @@ -49,10 +55,12 @@ "description": '<p>An overview of published data on disability and <mark>crime</mark> in the UK and analysis of the experience of domestic abuse and sexual assault for disabled adults aged 16 to 59 years in England and Wales. Analysis by age, sex and impairment type.</p>' }, { - "url": '#0', - "title": 'Hate crime by disability status, Crime Survey for England and Wales (CSEW) combined years 2013 and 2014 to 2015 and 2016', + "title": { + "text": 'Hate crime by disability status, Crime Survey for England and Wales (CSEW) combined years 2013 and 2014 to 2015 and 2016', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'User requested data', "ref": 'Ref 008052' }, diff --git a/src/components/download-resources/download-resources.spec.js b/src/components/download-resources/download-resources.spec.js index fd88dd196b..c01d0c8ed3 100644 --- a/src/components/download-resources/download-resources.spec.js +++ b/src/components/download-resources/download-resources.spec.js @@ -147,8 +147,10 @@ const EXAMPLE_PAGE = ` 'data-filter': 'general-public booklet', 'data-sort-index': '1', }, - url: '/example-booklet-1', - title: 'Example booklet 1', + title: { + url: '/example-booklet-1', + text: 'Example booklet 1', + }, description: 'The first example booklet.', }, { @@ -157,8 +159,10 @@ const EXAMPLE_PAGE = ` 'data-filter': 'general-public booklet logo', 'data-sort-index': '2', }, - url: '/example-booklet-2', - title: 'Example booklet 2 with logo', + title: { + url: '/example-booklet-2', + text: 'Example booklet 2 with logo', + }, description: 'The second example booklet with a logo.', }, { @@ -167,8 +171,10 @@ const EXAMPLE_PAGE = ` 'data-filter': 'logo', 'data-sort-index': '3', }, - url: '/example-logo', - title: 'Example logo', + title: { + url: '/example-logo', + text: 'Example logo', + }, description: 'An example logo.', }, ], diff --git a/src/patterns/download-resources/example-download-resources.njk b/src/patterns/download-resources/example-download-resources.njk index 98d88a7d2f..9e874fcd12 100644 --- a/src/patterns/download-resources/example-download-resources.njk +++ b/src/patterns/download-resources/example-download-resources.njk @@ -312,10 +312,12 @@ layout: ~ "data-sort-index": '1' }, "thumbnail": true, - "url": '#', - "title": "Census 2021 matters to everyone", + "title": { + "text": 'Census 2021 matters to everyone', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Poster' }, "file": { @@ -333,10 +335,12 @@ layout: ~ "data-sort-index": '2' }, "thumbnail": true, - "url": '#', - "title": 'Including everyone in Census 2021', + "title": { + "text": 'Including everyone in Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Poster' }, "file": { @@ -354,10 +358,12 @@ layout: ~ "data-sort-index": '3' }, "thumbnail": true, - "url": '#', - "title": "Census awareness poster", + "title": { + "text": 'Census awareness poster', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Poster' }, "file": { @@ -375,10 +381,12 @@ layout: ~ "data-sort-index": '4' }, "thumbnail": true, - "url": '#', - "title": "Community handbook for Census 2021", + "title": { + "text": 'Community handbook for Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Booklet' }, "file": { @@ -396,10 +404,12 @@ layout: ~ "data-sort-index": '5' }, "thumbnail": true, - "url": '#', - "title": "Brand guidelines for Census 2021", + "title": { + "text": 'Brand guidelines for Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": "Booklet" }, "file": { @@ -417,10 +427,12 @@ layout: ~ "data-sort-index": '6' }, "thumbnail": true, - "url": '#', - "title": "Tone of voice for Census 2021", + "title": { + "text": 'Tone of voice for Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": "Booklet" }, "file": { @@ -438,10 +450,12 @@ layout: ~ "data-sort-index": '7' }, "thumbnail": true, - "url": "#0", - "title": "Default awareness pop-up stand graphics for Census 2021", + "title": { + "text": 'Default awareness pop-up stand graphics for Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": "Poster" }, "file": { @@ -459,10 +473,12 @@ layout: ~ "data-sort-index": '8' }, "thumbnail": true, - "url": "#0", - "title": "Field officer jobs poster for Census 2021", + "title": { + "text": 'Field officer jobs poster for Census 2021', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": "Poster" }, "file": { @@ -480,10 +496,12 @@ layout: ~ "data-sort-index": '9' }, "thumbnail": true, - "url": "#0", - "title": "Census 2021 logos pack for print and web", + "title": { + "text": 'Census 2021 logos pack for print and web', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": "Logo" }, "file": { diff --git a/src/patterns/news/example-category.njk b/src/patterns/news/example-category.njk index 3f2f4d1ff5..3cf4d2ca1e 100644 --- a/src/patterns/news/example-category.njk +++ b/src/patterns/news/example-category.njk @@ -47,10 +47,12 @@ layout: ~ "smallSrc": '/img/small/ons-award-winners.jpg', "largeSrc": '/img/large/ons-award-winners.jpg' }, - "url": '#0', - "title": 'Office for National Statistics win top Royal Statistical Society award', + "title": { + "text": 'Office for National Statistics win top Royal Statistical Society award', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -66,10 +68,12 @@ layout: ~ "smallSrc": '/img/small/alison-pritchard.jpg', "largeSrc": '/img/large/alison-pritchard.jpg' }, - "url": '#0', - "title": 'ONS launches Integrated Data Service to boost government collaboration on data sharing', + "title": { + "text": 'ONS launches Integrated Data Service to boost government collaboration on data sharing', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -82,10 +86,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'Five Office for National Statistics names in New Year’s Honours', + "title": { + "text": 'Five Office for National Statistics names in New Year’s Honours', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -98,10 +104,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'National Data Strategy – the ONS takes centre stage', + "title": { + "text": 'National Data Strategy – the ONS takes centre stage', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -114,10 +122,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'The ONS named among the UK’s best employers for working families', + "title": { + "text": 'The ONS named among the UK’s best employers for working families', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, diff --git a/src/patterns/news/example-landing.njk b/src/patterns/news/example-landing.njk index f9b7d81049..3129386647 100644 --- a/src/patterns/news/example-landing.njk +++ b/src/patterns/news/example-landing.njk @@ -45,10 +45,12 @@ layout: ~ "smallSrc": '/img/small/census-monuments-lights-featured.jpg', "largeSrc": '/img/large/census-monuments-lights-featured.jpg' }, - "url": '#0', - "title": 'Landmarks are lighting up purple to mark Census Day', + "title": { + "text": 'Landmarks are lighting up purple to mark Census Day', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -74,10 +76,12 @@ layout: ~ "smallSrc": '/img/small/ons-award-winners.jpg', "largeSrc": '/img/large/ons-award-winners.jpg' }, - "url": '#0', - "title": 'Office for National Statistics win top Royal Statistical Society award', + "title": { + "text": 'Office for National Statistics win top Royal Statistical Society award', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -93,10 +97,12 @@ layout: ~ "smallSrc": '/img/small/alison-pritchard.jpg', "largeSrc": '/img/large/alison-pritchard.jpg' }, - "url": '#0', - "title": 'ONS launches Integrated Data Service to boost government collaboration on data sharing', + "title": { + "text": 'ONS launches Integrated Data Service to boost government collaboration on data sharing', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -109,10 +115,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'Five Office for National Statistics names in New Year’s Honours', + "title": { + "text": 'Five Office for National Statistics names in New Year’s Honours', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -125,10 +133,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'National Data Strategy – the ONS takes centre stage', + "title": { + "text": 'National Data Strategy – the ONS takes centre stage', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -141,10 +151,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'The ONS named among the UK’s best employers for working families', + "title": { + "text": 'The ONS named among the UK’s best employers for working families', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, diff --git a/src/patterns/news/example-tag.njk b/src/patterns/news/example-tag.njk index 179c7b1ca3..10b45c3096 100644 --- a/src/patterns/news/example-tag.njk +++ b/src/patterns/news/example-tag.njk @@ -46,10 +46,12 @@ layout: ~ "smallSrc": '/img/small/alison-pritchard.jpg', "largeSrc": '/img/large/alison-pritchard.jpg' }, - "url": '#0', - "title": 'ONS launches Integrated Data Service to boost government collaboration on data sharing', + "title": { + "text": 'ONS launches Integrated Data Service to boost government collaboration on data sharing', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -62,10 +64,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'Integrated Data Service', + "title": { + "text": 'Integrated Data Service', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' }, @@ -78,10 +82,12 @@ layout: ~ }, { "thumbnail": true, - "url": '#0', - "title": 'Integrated Data for Population Statistics Conference 2018', + "title": { + "text": 'Integrated Data for Population Statistics Conference 2018', + "url": '#0' + }, "metadata": { - "type": { + "object": { "text": 'Press releases', "url": '#0' },