Try our conversational search powered by Generative AI!

Direct Link to the Preview Mode


From within the episerver admin, is there a way to generate a 'direct link' to a page's Preview mode?  The 'Toggle preview mode' set to 'On', gives them exactly what they want.

When the author sends a link to some other staff members, it opens for the recipients in 'Edit Mode'.   They simply want a link that automatically opens with the 'Preview Mode' toggled on.

The link generally follows this pattern:|active:///true

So the end goal is:
"As an author, I want to share a link that opens the 'Preview Mode' toggled on for the recipient so that they can quickly review a draft"

Feb 24, 2021 16:05

I don't believe there's any way of getting in the admin currentl.

Programtically you can get the URL by calling PageEdititng.GetEditUrl(reference) so I would suggest adding something in to the admin or in your site when in preview mode. You could just add a bar at the top of your pages with the URL when PageEditing.PageIsInEditMode

Feb 25, 2021 9:21

Maybe not the optimal solution, but you could change the default view from edit mode to preview mode using an UI descriptor.

public class MyUIDescriptor : UIDescriptor<PageData>
    public MyUIDescriptor()
        DefaultView = CmsViewNames.PreviewView;
Feb 25, 2021 9:47

This might not be the most direct way to answer your question, but check out James Stout's (eGandalf's) Epi.PagePreview:

This was originally created to address the issue when a non-authenticated user (like a key stakeholder) needs access to preview a page before it is published, since preview is only meant for authenticated users.

Feb 25, 2021 20:39

Hey Brandon,  

Havent talked for a while.. Hope things are good on your end!!! 

You may want to look into extending one of the plug-in areas and creating a custom button or menu items and then use javascript to copy that link to the users clip board (or what ever you want to do with the link.

See if this helps you out....

Feb 25, 2021 22:41

Update to that last comment: See if this takes you close(ish)  to what you are looking for.  Add a Preview Link to the Navigation Pane

Feb 25, 2021 23:49

David, thanks!!  That should give us a much better 'flow' for the users. We'll give that a try.

Feb 26, 2021 14:12
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.