AI OnAI Off
var pageRouteHelper = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance<IPageRouteHelper>(); var currentPage = pageRouteHelper.Page;
I found this as an answer to a similar question and its working for me, - however this is my very first Episerver project, and would just like confirmatoin, that this is the "best practice way" to do this?
As far as best practice goes it is to build your blocks so that they don't need to know which page they are on.
Hi Guys,
I have a block on a page in Episerver, (content area) - from within the controller for the block how can I determin the node that represents the page that this block appares?