Get original page id when using umbracoInternalRedirectId
Hi! When using umbracoInternalRedirectId the ID for the page that is fetching content is overriden by the ID from the page that is retrieved.
I need the original ID for the highlighting of the main menu on the site. For example, if I fetch a page that is a child to another node on the site that node will be highlighted.
CurrentPage = content;
if (UmbracoContext.Current.PublishedContentRequest.IsInternalRedirectPublishedContent)
{
//Current page is an internal redirect. We want to use the initial published content, BEFORE the redirect
CurrentPage = UmbracoContext.Current.PublishedContentRequest.InitialPublishedContent;
}
Get original page id when using umbracoInternalRedirectId
Hi! When using umbracoInternalRedirectId the ID for the page that is fetching content is overriden by the ID from the page that is retrieved.
I need the original ID for the highlighting of the main menu on the site. For example, if I fetch a page that is a child to another node on the site that node will be highlighted.
Is it possible to get the original ID?
Hi,
I ran into this problem myself and managed to find a solution. You can get the original content using this property:
I use this code snippet in my menu partial:
is working on a reply...