Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
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
Maybe not the optimal solution, but you could change the default view from edit mode to preview mode using an UI descriptor.
[UIDescriptorRegistration]
public class MyUIDescriptor : UIDescriptor<PageData>
{
public MyUIDescriptor()
{
DefaultView = CmsViewNames.PreviewView;
}
}
This might not be the most direct way to answer your question, but check out James Stout's (eGandalf's) Epi.PagePreview:
https://nuget.episerver.com/package/?id=eGandalf.Epi.PagePreview
https://github.com/egandalf/eGandalf.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.
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....
https://world.episerver.com/documentation/developer-guides/CMS/user-interface/plug-in-areas/
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
David, thanks!! That should give us a much better 'flow' for the users. We'll give that a try.
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:
https://edit.domain.com/EPiServer/CMS/?language=en#context=epi.cms.contentdata:///123456&viewsetting=viewlanguage:///en|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"