Preview page or link to the frontend


(Jordan Elver) #1

It would be nice to be able to preview a page or maybe just add a link to the Node on the frontend?


PushType development roadmap
(Aaron Russell) #2

Agreed. This is a planned feature. In the original prototypes there was a button to preview a node, but it’s been removed as the feature didn’t exist.

I’ve got an informal road map, which I need to publish on here. I’ll have a think where this sits on the roadmap and get back to you @jordelver.


(Jordan Elver) #3

Ok, that sounds good.


(Aaron Russell) #4

Hey @jordelver so we now have a roadmap and this is on it! Although not until version 0.7.0 as this relates to some other work I want to do with integrating with different user models / authentication systems.

Here are my thoughts through, this should basically just use the existing NodesFrontEndController#show action. Take a look at this code:

What I’m thinking is fiddle with the scope chain so that if params[:preview] && user_signed_in? then don’t call the published scope. Make sense?

But that’s where it gets tricky - user_signed_in? relates to what I’m saying in the first paragraph.


(Ryan Heneise) #5

I’m curious if I’m missing something about how the preview works - my assumption was that if you change the content of the page and then click “Preview Page”, it would open a preview of the page with the updated content. Instead, the preview opens the current live version of the page. The only way to preview the page is to first save it, which publishes the changes, and then click the preview link. Am I missing something?


(Ryan Heneise) #6

Sorry, on second reading my question came off as overly curt. I’m just projecting my client’s frustration.

What’s happening is that my client is trying to make changes to their homepage. When he clicks “preview”, it opens up the preview window, but the page that’s displayed is the actual published homepage, without any of the changes that he’s entered into the form fields. I understand why it’s doing this, but he’s confused because in his mind it should work the way Wordpress does - when you click Preview it saves a copy of the page and shows you a true preview of what the page will look like if you publish it. In Pushtype, it seems that the only way to actually view changes is to publish the changes and then view the live page.

I wonder if this is something anyone else has experienced or has a workaround for?

What would be involved in creating a true preview mechanism? @aaron if this is something you’ve got started, is this something I could finish and create a PR?