-
Notifications
You must be signed in to change notification settings - Fork 39
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
Relations support #69
Comments
Hi @not-vainglorious I figured supporting relations would involve some extra API calls in the content manager 👍🏻 And yes I agree only Happy to start working on a PR with you! 🙂 |
@not-vainglorious The preview button plugin has recently updated to v1.1.1 with a new feature to use a See the Extending section of the README for full details. |
Hello @mattmilburn I want to create a custom url for preview button based on selected relation. I tried extending the plugin as per your README but the hook is not working. Followed each steps just like it is mentioned. Thanks |
I made my own plugin for nextjs revalidation and got some your ideas but with improvements. I added support to relations and if you like to see it I can extend your logic and create new pull request for this feature.
Should mention that it will work a bit different. I will use custom back-end endpoint which will redirect to correct url because i'm using strapi metadata to verify all things and define correct populates and requesting entity by one single request. Also this one works only with
manyToOne
andoneToOne
.As example this works like this:
Also when path ends with relation and not common field you will just get id so
{neighbourhood.city}
will add related city id to the query.Reply to issue if you like it and i will make PR for this one.
The text was updated successfully, but these errors were encountered: