November Happy Hour will be moved to Thursday December 5th.

Page templates and the Version List in the CMS

Vote:
 

Hi,

What is passed to my page template when the CMS is viewing a page that allows the template to know you want to view a different version (perhaps thus far unpublished) of the page?

Is there any way I can replicate this? At the moment, I'm capturing the URL before passing it to a third party template. The RawURL looks like this:

http://www.url.co.uk/Events/MyEvent/Overview/?idkeep=True&id=616_7471

Now I know that 616 is my pageId. What's 7471? Is that a version? Can I fetch this version of the page programmatically?

Thanks,

Karl.

#32906
Sep 23, 2009 19:08
Vote:
 

Hi!

Yes 7471 is the version id of the page 616. If you check the PageLink property of the page you should see that the ID is 616 and the WorkID is 7471. One way to fetch that specific version of the page is:

PageData page = DataFactory.Instance.GetPage(new PageReference("616_7471"));

Regards

Per Gunsarfs
EPiServer CMS development team

#32908
Sep 24, 2009 9:00
Vote:
 
Brilliant, thanks for that Per!
#32934
Sep 25, 2009 9:03
* 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.