Rendering internal Edit mode url

Vote:
 

Hi all,

I have an InitializationModule that fires out an email when a page is Published. In the email I need to render the Url to Edit mode for that specific page, page version and language. The Url looks like:

/EPiServer/CMS/?language=cy#context=epi.cms.contentdata:///2796_23678

Which is broken down by:

/EPiServer/CMS/?language={language}#context=epi.cms.contentdata:///{pageReference.ID}_{version}

So, I could easily enough render this string, however I'm thinking that there must be an EPiServer helper already? Any ideas?

Thanks in advance

Al

#79315
Dec 13, 2013 9:44
Vote:
 

You could use static method EPiServer.Editor.PageEditing.GetEditUrl that takes an ContentReference as parameter (in CMS 7.5. there is a similar method that takes language as well)

#79332
Dec 13, 2013 11:59
Vote:
 

Perfect Johan - of course, the language parameter doesnt actually need to be specified because a Version is language specific anyways!

Thanks

Al

#79357
Dec 13, 2013 18:09
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.