-
Notifications
You must be signed in to change notification settings - Fork 29
Cannot get linked entries #57
Description
Hey guys,
I'm having a difficult time retrieving the entries I need to retrieve. I have a contentful entry called aboutPage that contains two fields titled ourLeadership and ourStaff. Each of those fields contains multiple links to other entries called aboutPageStaff.
My metalsmith header contains this:
contentful:
entry_id: xaV2K7fvoWEkWCmqa04Sy
layout: base.html
Where the entry ID is for the specific aboutPage entry I'm getting.
I cannot find the right syntax to get at the aboutPageStaff data.
The aboutPage JSON preview looks like this:
{
"name": "About Page",
"description": "",
"displayField": null,
"fields": [
{
"id": "ourLeadership",
"name": "Our Leadership",
"type": "Array",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false,
"items": {
"type": "Link",
"validations": [
{
"linkContentType": [
"aboutPageStaff"
]
}
],
"linkType": "Entry"
}
},
{
"id": "ourStaff",
"name": "Our Staff",
"type": "Array",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false,
"items": {
"type": "Link",
"validations": [
{
"linkContentType": [
"aboutPageStaff"
]
}
],
"linkType": "Entry"
}
}
],
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "n4mniz0krvft"
}
},
"id": "aboutPage",
"type": "ContentType",
"createdAt": "2017-12-05T00:30:59.011Z",
"updatedAt": "2017-12-05T21:43:30.314Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "70A91lKqCD9LJIUA6M79k8"
}
},
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "70A91lKqCD9LJIUA6M79k8"
}
},
"publishedCounter": 3,
"version": 6,
"publishedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "70A91lKqCD9LJIUA6M79k8"
}
},
"publishedVersion": 5,
"firstPublishedAt": "2017-12-05T00:30:59.297Z",
"publishedAt": "2017-12-05T21:43:30.314Z"
}
}
And the aboutPageStaff content type looks like this:
{
"name": "About Page Staff",
"description": "Data for use on the About Page. Add these to the About Page content model. \n\nStaff Type determines if entry goes in the Our Leaders section, or the Our Staff section.",
"displayField": "name",
"fields": [
{
"id": "image",
"name": "Image",
"type": "Link",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false,
"linkType": "Asset"
},
{
"id": "name",
"name": "Name",
"type": "Symbol",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false
},
{
"id": "staffDetails",
"name": "Staff Details",
"type": "Text",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false
},
{
"id": "staffType",
"name": "Staff Type",
"type": "Symbol",
"localized": false,
"required": true,
"validations": [
{
"in": [
"Leaders",
"Staff"
]
}
],
"disabled": false,
"omitted": false
}
],
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "n4mniz0krvft"
}
},
"id": "aboutPageStaff",
"type": "ContentType",
"createdAt": "2017-12-05T00:25:31.668Z",
"updatedAt": "2017-12-05T00:25:31.985Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "70A91lKqCD9LJIUA6M79k8"
}
},
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "70A91lKqCD9LJIUA6M79k8"
}
},
"publishedCounter": 1,
"version": 2,
"publishedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "70A91lKqCD9LJIUA6M79k8"
}
},
"publishedVersion": 1,
"firstPublishedAt": "2017-12-05T00:25:31.985Z",
"publishedAt": "2017-12-05T00:25:31.985Z"
}
}