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'm in a situation in which I need to allow anonymous users to preview unpublished (or new unpublished version of published ) content.
I've searched the forum and found some posts about this but most of them come up with "you can't do it".
Some says to use Courier, run an Approval server where everyone can see content. But we don't have that setup unfortunately.
I think it boils down to removing the authorization checks on the preview pages, but it requires knowledge on core code base I don't have.
Anyone found a solution for this?
Intresting question, I would like to know if this is possible. (just out of interest)
but guessing, I would think it probably isn't possible, my instinct tells me that the authorization features applied globally to the back office and making it not apply to XYZ parts of it will not be possible with out lots of changes to the core...........(I maybe wrong)
Another approach would be, this.
When a user clicks on of the pages you take them to another page that under the hood goes to umbraco gets the data for the unpulished page and displays it.
This indeed a possible solution. Basically you say that the page, instead of relying on the umbraco cache, gets the data straight out of the DB.
The only issue I see is that now the umbraco controller will not have the document model already there, but would need to build it itself... so might be a bit complicate with the dozens of doctypes we have.
Thx for the idea
Pass in the id of the content node then use the content service API to get it?
yeah, but then from IContent I need to get an IPublishedContent and getting it back with ModelBuilder classes.
We have some code for converting IContent to IPublishedContent... Jeroen talks about it in this article : https://24days.in/umbraco-cms/2016/umbraco-edge-case-stories/
Yeah, I know that article... probably half the forum threads in the last 2 years have a link to it :)
Jokes aside.. messing up with the standard frontend controllers and changing all of them in order to get them work in preview mode seems a bit too much work.
I was hoping to just remove somehow the check on the backend authorization and use the standard preview functionality.
we used the content API and made some small changes to the code to make it work
Could you elaborate a bit more if possible? :)
we are using a custom version of shannon's Umbraco.Api package.
we modified the contentcontroller so content can be requested and rendered even if unpublished. this is what the umbraco preview button does anyway.
use the PreviewContent object alongside Umbraco.RenderTemplate:
I'm sorry for resurrecting this topic.
But I'm facing exactly the same request from a client.
They want to share a preview URL to some members of the administration, and don't want them to login...
We are using the latest version Umbraco V8
Our plan B is to create a generic User only with Viewer permissions and make them login :(
We appreciate your help
I'm also facing the same request from a client! Looks like it is a feature request :)
Any thoughts on this?
If you are trying to do this with Umbraco v8.9 and newer there is a package to help
I am on 8.8, but I will give it a try and probably consider upgrading if there are issues. Thanks for your help, Nik!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted