is it possible to inject the ipagedatacontext into a razor page. I've tried this
@inject IPageDataContext<TreeNode> pageDataContext <h3>@pageDataContext.Page.Parent.DocumentName</h3>
But I get this error
InvalidOperationException: No service for type 'Kentico.Content.Web.Mvc.IPageDataContext`1[CMS.DocumentEngine.TreeNode]' has been registered.
I'm just trying to get the parent document name.
Figured it out. needed to use IPageDataContextRetriever
IPageDataContextRetriever
Please, sign in to be able to submit a new answer.