Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get linked to entry data? #1657

Open
phpstudyone opened this issue Aug 31, 2023 · 1 comment
Open

how to get linked to entry data? #1657

phpstudyone opened this issue Aug 31, 2023 · 1 comment

Comments

@phpstudyone
Copy link

phpstudyone commented Aug 31, 2023

I expect to retrieve all data linked to this entry. I used the following code:

const sdk = useSDK();
const entryId = sdk.entry.getSys().id;

sdk.cma.entry.references({ entryId: entryId, include: 10 }).then(a=>{
    console.log(a, 3343434)
})

But it seems that the returned data is the entry itself, rather than the data that references this entry. What did I miss?

image

@phpstudyone
Copy link
Author

To get the data linked to the entry, it seems that you can only call preview-contentful-api. But the cma in useSDK uses the manage-contentful api. How do I use useSDK to get this content?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant