In this tutorial, you will gain access to some code that will allow you to get the current page item from the HTTP context. The Episerver PageController base class exposes a property that allows you to access the current page object easily. Meaning, when you are building normal Episerver pages it is super simple to access this data. If you are building a block controller or an ActionFilter attribute, you will not get access to this property and you will need to manually get it from the HTTP context object yourself. The code to do this is simple. I will show you how to get a reference to the page and the actual page object itself!

Getting A Page Reference: This will give you access to the current pages ContentReference:

Getting The Page Object: This will give you access to the current pages PageData object:


Happy Coding 🤘