I’m building a Kirby Preview much like Reveal. It has 2 iframes, one with the panel and one with the frontend. Is there a possibility to view the unsaved - or hidden page in Kirby so the User can directly see, when the user edits the page? Maybe the data is stored in the $page variable or there is already a preview page, that i can show in an iframe…
It’s a plugin made in kirby 2: reveal But haven’t tested it, since I have kirby 3. My Plugin is similar to the draft in github. So how does kirby builder make a preview of the data? For some reason it works in his plugin…
I guess you could follow a simmilar approach where you somehow POST the data from vue to a custom route that renders the entire page for you. As @texnixe said, unsaved content is not available in PHP world as long you do not send it over manually.
I am not exactly sure, how to access to entires page content/value object inside vue. But i think it is somehow possible to read the store of the entire panel form.
I will talk with my boss if it’s necessary. Would be a nice feature though. I checked the localstorage it has a page object which stores the original state and the changes… so maybe I could merge those two together and send it via GET or POST data…
I also have a react templates of the snippets… but maybe it’s not a good idea, since it’s duplicate Code.
Basically i updated the iframe everytime the store-button is clicked via event-listener. I’m not sure if i can share the code. But it has some custom programming as well.
ok, thanks @steve84 … it would be great if you could share at least some code oder explain in some words how your solutions extends the (old) kirby2 solution.