Page templates and the Version List in the CMS



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:

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



Sep 23, 2009 19:08


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"));


Per Gunsarfs
EPiServer CMS development team

Sep 24, 2009 9:00
Brilliant, thanks for that Per!
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.