romank
(Roman Kolomiiets)
November 29, 2021, 11:59am
1
How to import new added field to custom type like meta_title?
One of example how we tried to do that
{
"uid": "about-us",
"title": "About Us",
"meta_title": [{
'type': 'title',
'content': {
'span': [],
'text': 'test content'
}
}],
"body": {
"value": {
"repeat": [],
"non-repeat": {
"text_alignment": "left",
"padding_top": "0",
"padding_bottom": "0",
"body_text": {
"type": "paragraph",
"content": {
"text": "Content",
"spans": []
}
}
}
}
},
"type": "cms_page",
"tags": [],
"lang": "en-gb"
}
Priyanka
(Priyanka Maheshwari)
November 29, 2021, 1:07pm
3
Hello @romank
Thanks for reaching out to us.
To import newly added fields to Prismic. First, you need to create the field in the Custom Type with the same API ID. Then you can define the JSON structure for every field for Prismic imports. For meta_title,
the JSON structure should look like this:
Note: The Key values are in double quotes, not in the single quotes.
"meta_title": [
{ "type": "heading1", "content": { "text": "Add text here...", "spans": [] } }
],
Give this a try, and let me know if you have any further questions related to it.
Thanks,
Priyanka
Priyanka
(Priyanka Maheshwari)
December 1, 2021, 9:24am
7
Hello @romank
Have you tried Import with the suggested JSON structure? Are you still getting any issues?
I am looking forward to hearing from you back.
Thanks,
Priyanka
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
December 3, 2021, 9:49am
8
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.