Last active
November 12, 2018 14:51
-
-
Save jbreuer/956aeb77c0c679f44cc0 to your computer and use it in GitHub Desktop.
Get current domain root node in Umbraco content finder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NewsContentFinder : IContentFinder | |
{ | |
public bool TryFindContent(PublishedContentRequest contentRequest) | |
{ | |
if (contentRequest != null && contentRequest.HasDomain) | |
{ | |
var rootDomainNode = contentRequest.RoutingContext.UmbracoContext.ContentCache.GetById(contentRequest.Domain.RootNodeId); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment