Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I need a custom Umbraco 8 Headless for a project which i am using to query from a nextjs web site. I have successfully achieved it using route hijacking to return json using:
The nextjs web can query and navigate the umbraco content, using the umbraco url system, and works great!
Now i would like to get preview mode for the nextjs web.
Right now i have a template that redirects to the exact url on nextjs web so when you click on the url from the Info tab on Umbraco it gets to the web site.
My idea is when preview, redirect to the nextjs web with a flag param that makes the nextjs query content to umbraco and get non published content if the controller gets some kind of flag.
I know i can return non published using the content service, but i want to use the Umbraco helper.
I would like to know how Umbraco does it internally when you click preview button on the backoffice, because it uses the same code of the templates to render non published content.
How it works? how could i trick Umbraco from a controller to do it?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted