In this tutorial, you will learn how to access both the Episerver start page and root page object in code. Getting a reference to these objects is very useful during a build. If you need to access global settings, menu items, container pages, or even a setting page, you will normally need to reference one of these pages first. Luckily, it is extremely easy to access both objects 🔥🔥🔥.
Below shows you how to get a reference to the start page, root page and as an added bonus the block folder:
By using this one-liner with the IContentRepository
, you can then get access to the complete page in code! Happy Coding 🤘