Created
          August 31, 2017 14:42 
        
      - 
      
- 
        Save StefanoChiodino/9dc609842ad1c202e761b7319c7dbcd2 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or 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
    
  
  
    
  | private static string GetSingleNode(string modelTypeAlias) | |
| { | |
| var node = UmbracoContext.Current.ContentCache | |
| .GetSingleByXPath($"//{modelTypeAlias}[@isDoc]"); | |
| var url = node | |
| ?.Url; | |
| return url; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment