Try our conversational search powered by Generative AI!

How to show correct block version in page preview?

Vote:
 

Hi,

We have a CMS 7.5 MVC site using pages and blocks. When in edit mode, we'd like to view a particular version of a page and see the blocks as they were at the point in time the page was published.

Our problem is that the blocks shown in the preview are the latest published versions, and not the versions as they were at the time the page was published.

Is there a simple way of displaying the blocks as they were when the page was published? 

Thanks,

Phil.

#112995
Nov 10, 2014 12:39
Vote:
 

Unfortunately there is no preview for a page with other block versions than the published one.

If you want to see how a page will look like with upcoming versions you can check out the upcoming feature 'Projects'

http://world.episerver.com/Blogs/Magnus-Stalberg/Dates/2014/8/Projects-Beta/

#113019
Nov 10, 2014 17:26
Vote:
 

Thanks Alf, I had a horrible feeling that would be the answer!

Well, we need to view previous pages exactly as they were published so we'll have to go about building our own custom preview...has anyone done this in the past, and if so, any advice? Cheers!

#113020
Nov 10, 2014 17:50
Vote:
 

Surely this is a bug?

If I change a page property and click preview, I see the page as it will be.

However, if I have a block on the page and wish to change the block, the only way I can preview the page with the changed block is to publish the block, but this of course makes the block visible in the 'Live' page.

#113394
Nov 19, 2014 15:39
Vote:
 

This has been mentioned in various forums and there is no good reply to whether it is a bug or not. That discussion can go o on for an eternity. Some users expects that it's the published version of the block that should be visible when previewing the page while others don't.

EPiServers approach to this is the 'Projects' I mentioned earlier.

Otherwise you can create your block previews to display the block in that tag/size that it would be viewed on your page to give a better preview.

#113406
Nov 19, 2014 17:02
Vote:
 

Alf,

Projects won't be an option for us, as our customer requires a strict workflow and sign-off requires a view of the page as it would be when published, not several views of the individual blocks that make it up.

Hmmm... all our blocks are rendered in ContentAreas - would the right approach for previewing be to create a subclass of PropertyContentArea that returned the latest version of each block contained within it when in Preview mode, and change our ContentArea properties to be the subclass?

#113411
Nov 19, 2014 17:48
Vote:
 

Creating a sub control might work 

Since there can be many drafts simultaneously I recommend that you use either 'ready to publish' or marking a draftas 'active' to determine exactly which draft you want to preview on the page.

also I would recommend that you create a specific display channel so that the editors easily can toggle between previewing 'what does the visitor see now' and 'how does it look with the unpublished versions'.

#113412
Nov 19, 2014 18: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.