Getting currentpage from within a RenderAction

Vote:
 

I need some way to get the current PageReference from within a render action - view

#75674
Oct 03, 2013 14:10
Vote:
 

This will give you the current page:

var pageRouteHelper = EPiServer.ServiceLocation.ServiceLocator
           .Current.GetInstance<EPiServer.Web.Routing.PageRouteHelper>();
var currentPage = pageRouteHelper.Page;

    

#75677
Oct 03, 2013 15:47
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.