|
// all this just to get the current page :( |
var currentPage = UmbracoContext.PublishedRequest?.PublishedContent;
Two lines shorter, and no need to go again through the routing ? But it would probably be better to use those views with components (and maybe a custom context to avoid redondant data discovery) that will create specific viewmodels. All this could be a good start point for further customization as well.
UmBootstrap/Umbootstrap.Web/Views/Partials/FeaturesGlobal/header.cshtml
Line 9 in 7d49dfb
var currentPage = UmbracoContext.PublishedRequest?.PublishedContent;
Two lines shorter, and no need to go again through the routing ? But it would probably be better to use those views with components (and maybe a custom context to avoid redondant data discovery) that will create specific viewmodels. All this could be a good start point for further customization as well.