Hey, I'm trying to get a page from TinyMCE content URL-s. Sometimes, the HTML code for them is ie. "/link/5e2e383dc27944599568d46b085d62d2.aspx" and sometimes, URL is a an Edit mode URL, ie. /EPiServer/CMS/Content/om-fonus/demo-page,,124/. It seems that the edit-mode URL is displayed on page load, but once you change the page selection, you get the /link/xxxx.aspx.
The following code works for the classic link, but not in the case of edit-mode:
public static PageData GetPageFromClassicUrl(string classicUrl)
{
string linkUrl;
if (PermanentLinkMapStore.TryToMapped(classicUrl, out linkUrl))
{
var pageReference = PageReference.ParseUrl(linkUrl);
if (!PageReference.IsNullOrEmpty(pageReference))
{
var page = DataFactory.Instance.GetPage(pageReference, LanguageSelector.AutoDetect());
return page;
}
}
return null;
}
Does anyone know how to get the page from the latter (edit-mode) or should I parse the string and get the ID between a comma and a slash?
Hey, I'm trying to get a page from TinyMCE content URL-s. Sometimes, the HTML code for them is ie. "/link/5e2e383dc27944599568d46b085d62d2.aspx" and sometimes, URL is a an Edit mode URL, ie. /EPiServer/CMS/Content/om-fonus/demo-page,,124/. It seems that the edit-mode URL is displayed on page load, but once you change the page selection, you get the /link/xxxx.aspx.
The following code works for the classic link, but not in the case of edit-mode:
Does anyone know how to get the page from the latter (edit-mode) or should I parse the string and get the ID between a comma and a slash?
Thx!