We started to implement project using Kentico 8 and ASP.NET MVC 4.
To mange Urls we registered routes in Route.config file. We tried to call DocumentContext.CurrentDocument inside our controllers but it returns fake data: always the page with default alias path ('/').
If urls are configured manually via cmsdesk everything works fine, but it doesn't seem to be rational to add url for each page.
Could this be fixed in any other way except managing routes manually?
The problem is that in this case the Context itself is not available and therefore calls such as CurrentDocument will not return any document. The solution for this is to get the Node/Document manually.
Please, sign in to be able to submit a new answer.