You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm back with another question which is much more about getting your advices and best practices for preview setup.
Let'say that I setup a website called www.mysite.com with Contentful and I want to add the preview feature.
What I have in mind is that I want to setup a simple preview passing a query string parameter like ?preview=1 to switch to preview mode. For example, on the homepage https://www.mysite.com/ will switch to preview mode when I add https://www.mysite.com/?preview=1
First question, is it a good idea ?
Now, going deeper in it, I created a service called "Contentful" where I inject the client thanks to dependency injection:
Hello everybody,
I'm back with another question which is much more about getting your advices and best practices for preview setup.
Let'say that I setup a website called www.mysite.com with Contentful and I want to add the preview feature.
What I have in mind is that I want to setup a simple preview passing a query string parameter like ?preview=1 to switch to preview mode. For example, on the homepage https://www.mysite.com/ will switch to preview mode when I add https://www.mysite.com/?preview=1
First question, is it a good idea ?
Now, going deeper in it, I created a service called "Contentful" where I inject the client thanks to dependency injection:
Now, I'm a little bit stuck about the way to switch to preview API with my client injected like that.
What I have in mind is :
Is it a good strategy or am I overcomplicating things ?
What is yours ? ( using a subdomain ? )
Thanks for your feedback.
Best.
The text was updated successfully, but these errors were encountered: