コード例 #1
0
 /// <summary>
 /// Gets content identified by a route.
 /// </summary>
 /// <param name="preview">A value indicating whether to consider unpublished content.</param>
 /// <param name="route">The route</param>
 /// <param name="hideTopLevelNode">A value forcing the HideTopLevelNode setting.</param>
 /// <returns>The content, or null.</returns>
 /// <remarks>A valid route is either a simple path eg <c>/foo/bar/nil</c> or a root node id and a path, eg <c>123/foo/bar/nil</c>.</remarks>
 public IPublishedContent GetByRoute(bool preview, string route, bool?hideTopLevelNode = null)
 {
     return(InnerCache.GetByRoute(UmbracoContext, preview, route, hideTopLevelNode));
 }