View Source
Class PublishedContentExtensions
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class PublishedContentExtensions
Methods
View Source
Ancestor(IPublishedContent, Int32)
Declaration
public static IPublishedContent Ancestor(this IPublishedContent content, int maxLevel)
Parameters
Returns
View Source
Ancestor(IPublishedContent, String)
Declaration
public static IPublishedContent Ancestor(this IPublishedContent content, string contentTypeAlias)
Parameters
Returns
View Source
Ancestor(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the ancestor of the content, ie its parent.
Declaration
public static IPublishedContent Ancestor(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
Parameters
Returns
View Source
Ancestor(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the nearest ancestor of the content, at a lever lesser or equal to a specified level.
Declaration
public static IPublishedContent Ancestor(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
Parameters
Returns
Type |
Description |
IPublishedContent |
The nearest (in down-top order) ancestor of the content, at a level lesser or equal to the specified level.
|
View Source
Ancestor(IPublishedContent, IPublishedCache, INavigationQueryService, String)
Gets the nearest ancestor of the content, of a specified content type.
Declaration
public static IPublishedContent Ancestor(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias)
Parameters
Returns
Type |
Description |
IPublishedContent |
The nearest (in down-top order) ancestor of the content, of the specified content type.
|
View Source
Ancestor<T>(IPublishedContent, Int32)
Declaration
public static T Ancestor<T>(this IPublishedContent content, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
Ancestor<T>(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the nearest ancestor of the content, of a specified content type.
Declaration
public static T Ancestor<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
T |
The nearest (in down-top order) ancestor of the content, of the specified content type.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
Ancestor<T>(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the nearest ancestor of the content, at the specified level and of the specified content type.
Declaration
public static T Ancestor<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
T |
The ancestor of the content, at the specified level and of the specified content type.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
AncestorOrSelf(IPublishedContent)
Gets the content or its nearest ancestor.
Declaration
public static IPublishedContent AncestorOrSelf(this IPublishedContent content)
Parameters
Returns
View Source
AncestorOrSelf(IPublishedContent, Int32)
Declaration
public static IPublishedContent AncestorOrSelf(this IPublishedContent content, int maxLevel)
Parameters
Returns
View Source
AncestorOrSelf(IPublishedContent, String)
Declaration
public static IPublishedContent AncestorOrSelf(this IPublishedContent content, string contentTypeAlias)
Parameters
Returns
View Source
AncestorOrSelf(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the content or its nearest ancestor, at a lever lesser or equal to a specified level.
Declaration
public static IPublishedContent AncestorOrSelf(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
Parameters
Returns
Type |
Description |
IPublishedContent |
The content or its nearest (in down-top order) ancestor, at a level lesser or equal to the specified level.
|
View Source
AncestorOrSelf(IPublishedContent, IPublishedCache, INavigationQueryService, String)
Gets the content or its nearest ancestor, of a specified content type.
Declaration
public static IPublishedContent AncestorOrSelf(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias)
Parameters
Returns
Type |
Description |
IPublishedContent |
The content or its nearest (in down-top order) ancestor, of the specified content type.
|
View Source
AncestorOrSelf<T>(IPublishedContent, Int32)
Declaration
public static T AncestorOrSelf<T>(this IPublishedContent content, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
AncestorOrSelf<T>(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the content or its nearest ancestor, of a specified content type.
Declaration
public static T AncestorOrSelf<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
T |
The content or its nearest (in down-top order) ancestor, of the specified content type.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
AncestorOrSelf<T>(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the content or its nearest ancestor, at a lever lesser or equal to a specified level, and of a specified
content type.
Declaration
public static T AncestorOrSelf<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
Ancestors(IPublishedContent, Int32)
Declaration
public static IEnumerable<IPublishedContent> Ancestors(this IPublishedContent content, int maxLevel)
Parameters
Returns
View Source
Ancestors(IPublishedContent, String)
Declaration
public static IEnumerable<IPublishedContent> Ancestors(this IPublishedContent content, string contentTypeAlias)
Parameters
Returns
View Source
Ancestors(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the ancestors of the content.
Declaration
public static IEnumerable<IPublishedContent> Ancestors(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The ancestors of the content, in down-top order.
|
View Source
Ancestors(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the ancestors of the content, at a level lesser or equal to a specified level.
Declaration
public static IEnumerable<IPublishedContent> Ancestors(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The ancestors of the content, at a level lesser or equal to the specified level, in down-top order.
|
View Source
Ancestors(IPublishedContent, IPublishedCache, INavigationQueryService, String)
Gets the ancestors of the content, of a specified content type.
Declaration
public static IEnumerable<IPublishedContent> Ancestors(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The ancestors of the content, of the specified content type, in down-top order.
|
View Source
Ancestors<T>(IPublishedContent)
Declaration
public static IEnumerable<T> Ancestors<T>(this IPublishedContent content)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
Ancestors<T>(IPublishedContent, Int32)
Declaration
public static IEnumerable<T> Ancestors<T>(this IPublishedContent content, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
Ancestors<T>(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the ancestors of the content, of a specified content type.
Declaration
public static IEnumerable<T> Ancestors<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
The ancestors of the content, of the specified content type, in down-top order.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
Ancestors<T>(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the ancestors of the content, at a level lesser or equal to a specified level, and of a specified content
type.
Declaration
public static IEnumerable<T> Ancestors<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
The ancestors of the content, at a level lesser or equal to the specified level, and of the specified
content type, in down-top order.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
AncestorsOrSelf(IPublishedContent, Boolean, Nullable<Func<IPublishedContent, Boolean>>)
Declaration
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, bool orSelf, Func<IPublishedContent, bool>? func)
Parameters
Returns
View Source
AncestorsOrSelf(IPublishedContent, Int32)
Declaration
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, int maxLevel)
Parameters
Returns
View Source
AncestorsOrSelf(IPublishedContent, String)
Declaration
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, string contentTypeAlias)
Parameters
Returns
View Source
AncestorsOrSelf(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the content and its ancestors.
Declaration
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The content and its ancestors, in down-top order.
|
View Source
AncestorsOrSelf(IPublishedContent, IPublishedCache, INavigationQueryService, Boolean, Nullable<Func<IPublishedContent, Boolean>>)
Declaration
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, bool orSelf, Func<IPublishedContent, bool>? func)
Parameters
Returns
View Source
AncestorsOrSelf(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the content and its ancestors, at a level lesser or equal to a specified level.
Declaration
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The content and its ancestors, at a level lesser or equal to the specified level,
in down-top order.
|
View Source
AncestorsOrSelf(IPublishedContent, IPublishedCache, INavigationQueryService, String)
Gets the content and its ancestors, of a specified content type.
Declaration
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The content and its ancestors, of the specified content type, in down-top order.
|
View Source
AncestorsOrSelf<T>(IPublishedContent, Int32)
Declaration
public static IEnumerable<T> AncestorsOrSelf<T>(this IPublishedContent content, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
AncestorsOrSelf<T>(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the content and its ancestors, of a specified content type.
Declaration
public static IEnumerable<T> AncestorsOrSelf<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
The content and its ancestors, of the specified content type, in down-top order.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
AncestorsOrSelf<T>(IPublishedContent, IPublishedCache, INavigationQueryService, Int32)
Gets the content and its ancestor, at a lever lesser or equal to a specified level, and of a specified content
type.
Declaration
public static IEnumerable<T> AncestorsOrSelf<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int maxLevel)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
The content and its ancestors, at a level lesser or equal to the specified level, and of the specified
content type, in down-top order.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
Breadcrumbs(IPublishedContent, Boolean)
Declaration
public static IEnumerable<IPublishedContent> Breadcrumbs(this IPublishedContent content, bool andSelf = true)
Parameters
Returns
View Source
Breadcrumbs(IPublishedContent, Int32, Boolean)
Declaration
public static IEnumerable<IPublishedContent> Breadcrumbs(this IPublishedContent content, int minLevel, bool andSelf = true)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
|
System.Int32 |
minLevel |
|
System.Boolean |
andSelf |
|
Returns
View Source
Breadcrumbs(IPublishedContent, IPublishedCache, INavigationQueryService, Boolean)
Gets the breadcrumbs (ancestors and self, top to bottom) for the specified content
.
Declaration
public static IEnumerable<IPublishedContent> Breadcrumbs(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, bool andSelf = true)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
IPublishedCache |
publishedCache |
The content cache.
|
INavigationQueryService |
navigationQueryService |
The query service for the in-memory navigation structure.
|
System.Boolean |
andSelf |
Indicates whether the specified content should be included.
|
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The breadcrumbs (ancestors and self, top to bottom) for the specified content .
|
View Source
Breadcrumbs(IPublishedContent, IPublishedCache, INavigationQueryService, Int32, Boolean)
Gets the breadcrumbs (ancestors and self, top to bottom) for the specified content
at a level
higher or equal to minLevel
.
Declaration
public static IEnumerable<IPublishedContent> Breadcrumbs(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int minLevel, bool andSelf = true)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
IPublishedCache |
publishedCache |
The content cache.
|
INavigationQueryService |
navigationQueryService |
The query service for the in-memory navigation structure.
|
System.Int32 |
minLevel |
The minimum level.
|
System.Boolean |
andSelf |
Indicates whether the specified content should be included.
|
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The breadcrumbs (ancestors and self, top to bottom) for the specified content at a level higher
or equal to minLevel .
|
View Source
Breadcrumbs<T>(IPublishedContent, Boolean)
Declaration
public static IEnumerable<IPublishedContent> Breadcrumbs<T>(this IPublishedContent content, bool andSelf = true)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
Breadcrumbs<T>(IPublishedContent, IPublishedCache, INavigationQueryService, Boolean)
Gets the breadcrumbs (ancestors and self, top to bottom) for the specified content
at a level
higher or equal to the specified root content type T
.
Declaration
public static IEnumerable<IPublishedContent> Breadcrumbs<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, bool andSelf = true)
where T : class, IPublishedContent
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
IPublishedCache |
publishedCache |
The content cache.
|
INavigationQueryService |
navigationQueryService |
The query service for the in-memory navigation structure.
|
System.Boolean |
andSelf |
Indicates whether the specified content should be included.
|
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The breadcrumbs (ancestors and self, top to bottom) for the specified content at a level higher
or equal to the specified root content type T .
|
Type Parameters
Name |
Description |
T |
The root content type.
|
View Source
Children(IPublishedContent, IVariationContextAccessor, Func<IPublishedContent, Boolean>, String)
Declaration
public static IEnumerable<IPublishedContent> Children(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, Func<IPublishedContent, bool> predicate, string culture = null)
Parameters
Returns
View Source
Children(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<IPublishedContent> Children(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
Children(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Func<IPublishedContent, Boolean>, String)
Gets the children of the content, filtered by a predicate.
Declaration
public static IEnumerable<IPublishedContent> Children(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, Func<IPublishedContent, bool> predicate, string culture = null)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The children of the content, filtered by the predicate.
|
View Source
Children(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Gets the children of the content item.
Declaration
public static IEnumerable<IPublishedContent> Children(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
Parameters
Returns
View Source
Children<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<T> Children<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
Children<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Gets the children of the content, of a given content type.
Declaration
public static IEnumerable<T> Children<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
The children of content, of the given content type.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
ChildrenAsTable(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, IContentTypeService, IMediaTypeService, IMemberTypeService, IPublishedUrlProvider, String, String)
Gets the children of the content in a DataTable.
Declaration
public static DataTable ChildrenAsTable(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IPublishedUrlProvider publishedUrlProvider, string contentTypeAliasFilter = "", string culture = null)
Parameters
Returns
Type |
Description |
System.Data.DataTable |
The children of the content.
|
View Source
ChildrenAsTable(IPublishedContent, IVariationContextAccessor, IContentTypeService, IMediaTypeService, IMemberTypeService, IPublishedUrlProvider, String, String)
Declaration
public static DataTable ChildrenAsTable(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IPublishedUrlProvider publishedUrlProvider, string contentTypeAliasFilter = "", string culture = null)
Parameters
Returns
Type |
Description |
System.Data.DataTable |
|
View Source
ChildrenOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IEnumerable<IPublishedContent> ChildrenOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
ChildrenOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Gets the children of the content, of any of the specified types.
Declaration
public static IEnumerable<IPublishedContent> ChildrenOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
IVariationContextAccessor |
variationContextAccessor |
The accessor for the VariationContext
|
IPublishedCache |
publishedCache |
|
INavigationQueryService |
navigationQueryService |
|
System.String |
contentTypeAlias |
The content type alias.
|
System.String |
culture |
The specific culture to filter for. If null is used the current culture is used. (Default is
null)
|
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The children of the content, of any of the specified types.
|
View Source
CultureDate(IPublishedContent, IVariationContextAccessor, String)
Gets the culture date of the content item.
Declaration
public static DateTime CultureDate(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content item.
|
IVariationContextAccessor |
variationContextAccessor |
|
System.String |
culture |
The specific culture to get the name for. If null is used the current culture is used (Default is
null).
|
Returns
Type |
Description |
DateTime |
|
View Source
Descendant(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static IPublishedContent Descendant(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
Parameters
Returns
View Source
Descendant(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IPublishedContent Descendant(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
Descendant(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static IPublishedContent Descendant(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
Parameters
Returns
View Source
Descendant(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static IPublishedContent Descendant(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
Parameters
Returns
View Source
Descendant<T>(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static T Descendant<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
Descendant<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static T Descendant<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
Descendant<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static T Descendant<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
Descendant<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static T Descendant<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
DescendantOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IPublishedContent DescendantOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Declaration
public static IPublishedContent DescendantOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantOrSelf(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static IPublishedContent DescendantOrSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
Parameters
Returns
View Source
DescendantOrSelf(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IPublishedContent DescendantOrSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
DescendantOrSelf(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static IPublishedContent DescendantOrSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
Parameters
Returns
View Source
DescendantOrSelf<T>(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static T DescendantOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
DescendantOrSelf<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static T DescendantOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
DescendantOrSelf<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static T DescendantOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
DescendantOrSelf<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static T DescendantOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
DescendantOrSelfOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IPublishedContent DescendantOrSelfOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantOrSelfOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Declaration
public static IPublishedContent DescendantOrSelfOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
Descendants(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static IEnumerable<IPublishedContent> Descendants(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
Parameters
Returns
View Source
Descendants(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<IPublishedContent> Descendants(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
Descendants(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static IEnumerable<IPublishedContent> Descendants(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
Parameters
Returns
View Source
Descendants(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static IEnumerable<IPublishedContent> Descendants(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
Parameters
Returns
View Source
Descendants<T>(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static IEnumerable<T> Descendants<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
Descendants<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<T> Descendants<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
Descendants<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static IEnumerable<T> Descendants<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
Descendants<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static IEnumerable<T> Descendants<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
DescendantsOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantsOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelf(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelf(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelf(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelf(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelf<T>(IEnumerable<IPublishedContent>, IVariationContextAccessor, String)
Declaration
public static IEnumerable<T> DescendantsOrSelf<T>(this IEnumerable<IPublishedContent> parentNodes, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
DescendantsOrSelf<T>(IEnumerable<IPublishedContent>, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Returns all DescendantsOrSelf of all content referenced
Declaration
public static IEnumerable<T> DescendantsOrSelf<T>(this IEnumerable<IPublishedContent> parentNodes, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
DescendantsOrSelf<T>(IPublishedContent, IVariationContextAccessor, Int32, String)
Declaration
public static IEnumerable<T> DescendantsOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
DescendantsOrSelf<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<T> DescendantsOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
DescendantsOrSelf<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Int32, String)
Declaration
public static IEnumerable<T> DescendantsOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, int level, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
DescendantsOrSelf<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static IEnumerable<T> DescendantsOrSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
DescendantsOrSelfOfType(IEnumerable<IPublishedContent>, IVariationContextAccessor, String, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelfOfType(this IEnumerable<IPublishedContent> parentNodes, IVariationContextAccessor variationContextAccessor, string docTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelfOfType(IEnumerable<IPublishedContent>, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Returns all DescendantsOrSelf of all content referenced
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelfOfType(this IEnumerable<IPublishedContent> parentNodes, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string docTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelfOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelfOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
DescendantsOrSelfOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Declaration
public static IEnumerable<IPublishedContent> DescendantsOrSelfOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
FirstChild(IPublishedContent, IVariationContextAccessor, Func<IPublishedContent, Boolean>, String)
Declaration
public static IPublishedContent FirstChild(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, Func<IPublishedContent, bool> predicate, string culture = null)
Parameters
Returns
View Source
FirstChild(IPublishedContent, IVariationContextAccessor, Guid, String)
Declaration
public static IPublishedContent FirstChild(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, Guid uniqueId, string culture = null)
Parameters
Returns
View Source
FirstChild(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IPublishedContent FirstChild(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
FirstChild(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Func<IPublishedContent, Boolean>, String)
Declaration
public static IPublishedContent FirstChild(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, Func<IPublishedContent, bool> predicate, string culture = null)
Parameters
Returns
View Source
FirstChild(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Guid, String)
Declaration
public static IPublishedContent FirstChild(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, Guid uniqueId, string culture = null)
Parameters
Returns
View Source
FirstChild(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static IPublishedContent FirstChild(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
Parameters
Returns
View Source
FirstChild<T>(IPublishedContent, IVariationContextAccessor, Func<T, Boolean>, String)
Declaration
public static T FirstChild<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, Func<T, bool> predicate, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
FirstChild<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static T FirstChild<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
FirstChild<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, Func<T, Boolean>, String)
Declaration
public static T FirstChild<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, Func<T, bool> predicate, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
FirstChild<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Declaration
public static T FirstChild<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type Parameters
View Source
FirstChildOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IPublishedContent FirstChildOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
FirstChildOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Gets the first child of the content, of a given content type.
Declaration
public static IPublishedContent FirstChildOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
GetCreatorName(IPublishedContent, IUserService)
Declaration
public static string GetCreatorName(this IPublishedContent content, IUserService userService)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
GetTemplateAlias(IPublishedContent, IFileService)
Returns the current template Alias
Declaration
public static string GetTemplateAlias(this IPublishedContent content, IFileService fileService)
Parameters
Returns
Type |
Description |
System.String |
Empty string if none is set.
|
View Source
GetWriterName(IPublishedContent, IUserService)
Declaration
public static string GetWriterName(this IPublishedContent content, IUserService userService)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
HasCulture(IPublishedContent, String)
Determines whether the content has a culture.
Declaration
public static bool HasCulture(this IPublishedContent content, string culture)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
HasValue(IPublishedContent, IPublishedValueFallback, String, String, String, Fallback)
Gets a value indicating whether the content has a value for a property identified by its alias.
Declaration
public static bool HasValue(this IPublishedContent content, IPublishedValueFallback publishedValueFallback, string alias, string culture = null, string segment = null, Fallback fallback = default(Fallback))
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
IPublishedValueFallback |
publishedValueFallback |
The published value fallback implementation.
|
System.String |
alias |
The property alias.
|
System.String |
culture |
The variation language.
|
System.String |
segment |
The variation segment.
|
Fallback |
fallback |
Optional fallback strategy.
|
Returns
Type |
Description |
System.Boolean |
A value indicating whether the content has a value for the property identified by the alias.
|
View Source
IsAllowedTemplate(IPublishedContent, IContentTypeService, Boolean, Boolean, Int32)
Declaration
public static bool IsAllowedTemplate(this IPublishedContent content, IContentTypeService contentTypeService, bool disableAlternativeTemplates, bool validateAlternativeTemplates, int templateId)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
|
IContentTypeService |
contentTypeService |
|
System.Boolean |
disableAlternativeTemplates |
|
System.Boolean |
validateAlternativeTemplates |
|
System.Int32 |
templateId |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
IsAllowedTemplate(IPublishedContent, IContentTypeService, WebRoutingSettings, Int32)
Declaration
public static bool IsAllowedTemplate(this IPublishedContent content, IContentTypeService contentTypeService, WebRoutingSettings webRoutingSettings, int templateId)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsAllowedTemplate(IPublishedContent, IFileService, IContentTypeService, Boolean, Boolean, String)
Declaration
public static bool IsAllowedTemplate(this IPublishedContent content, IFileService fileService, IContentTypeService contentTypeService, bool disableAlternativeTemplates, bool validateAlternativeTemplates, string templateAlias)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsAncestor(IPublishedContent, IPublishedContent)
Declaration
public static bool IsAncestor(this IPublishedContent content, IPublishedContent other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsAncestorOrSelf(IPublishedContent, IPublishedContent)
Declaration
public static bool IsAncestorOrSelf(this IPublishedContent content, IPublishedContent other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsComposedOf(IPublishedContent, String)
Gets a value indicating whether the content is of a content type composed of the given alias
Declaration
public static bool IsComposedOf(this IPublishedContent content, string alias)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
System.String |
alias |
The content type alias.
|
Returns
Type |
Description |
System.Boolean |
A value indicating whether the content is of a content type composed of a content type identified by the
alias.
|
View Source
IsDescendant(IPublishedContent, IPublishedContent)
Declaration
public static bool IsDescendant(this IPublishedContent content, IPublishedContent other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsDescendantOrSelf(IPublishedContent, IPublishedContent)
Declaration
public static bool IsDescendantOrSelf(this IPublishedContent content, IPublishedContent other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsDocumentType(IPublishedContent, String)
Determines whether the specified content is a specified content type.
Declaration
public static bool IsDocumentType(this IPublishedContent content, string docTypeAlias)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content to determine content type of.
|
System.String |
docTypeAlias |
The alias of the content type to test against.
|
Returns
Type |
Description |
System.Boolean |
True if the content is of the specified content type; otherwise false.
|
View Source
IsDocumentType(IPublishedContent, String, Boolean)
Determines whether the specified content is a specified content type or it's derived types.
Declaration
public static bool IsDocumentType(this IPublishedContent content, string docTypeAlias, bool recursive)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content to determine content type of.
|
System.String |
docTypeAlias |
The alias of the content type to test against.
|
System.Boolean |
recursive |
When true, recurses up the content type tree to check inheritance; when false just calls
IsDocumentType(this IPublishedContent content, string docTypeAlias).
|
Returns
Type |
Description |
System.Boolean |
True if the content is of the specified content type or a derived content type; otherwise false.
|
View Source
IsEqual(IPublishedContent, IPublishedContent)
Declaration
public static bool IsEqual(this IPublishedContent content, IPublishedContent other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsInvariantOrHasCulture(IPublishedContent, String)
Determines whether the content is invariant, or has a culture.
Declaration
public static bool IsInvariantOrHasCulture(this IPublishedContent content, string culture)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsNotEqual(IPublishedContent, IPublishedContent)
Declaration
public static bool IsNotEqual(this IPublishedContent content, IPublishedContent other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
Name(IPublishedContent, IVariationContextAccessor, String)
Gets the name of the content item.
Declaration
public static string Name(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content item.
|
IVariationContextAccessor |
variationContextAccessor |
|
System.String |
culture |
The specific culture to get the name for. If null is used the current culture is used (Default is
null).
|
Returns
Type |
Description |
System.String |
|
View Source
Parent<T>(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the parent of the content, of a given content type.
Declaration
public static T Parent<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
T |
The parent of content, of the given content type, else null.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
Root(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the root content (ancestor or self at level 1) for the specified content
.
Declaration
public static IPublishedContent Root(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
Parameters
Returns
Type |
Description |
IPublishedContent |
The root content (ancestor or self at level 1) for the specified content .
|
View Source
Root<T>(IPublishedContent, IPublishedCache, INavigationQueryService)
Gets the root content (ancestor or self at level 1) for the specified content
if it's of the
specified content type T
.
Declaration
public static T Root<T>(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
T |
The root content (ancestor or self at level 1) for the specified content of content type
T .
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
Siblings(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<IPublishedContent> Siblings(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
Siblings(IPublishedContent, IPublishedCache, INavigationQueryService, IVariationContextAccessor, String)
Gets the siblings of the content.
Declaration
public static IEnumerable<IPublishedContent> Siblings(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
Siblings<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<T> Siblings<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
Siblings<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Gets the siblings of the content, of a given content type.
Declaration
public static IEnumerable<T> Siblings<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
The siblings of the content, of the given content type.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
SiblingsAndSelf(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<IPublishedContent>? SiblingsAndSelf(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
View Source
SiblingsAndSelf(IPublishedContent, IPublishedCache, INavigationQueryService, IVariationContextAccessor, String)
Gets the siblings of the content including the node itself to indicate the position.
Declaration
public static IEnumerable<IPublishedContent>? SiblingsAndSelf(this IPublishedContent content, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Returns
Type |
Description |
System.Nullable<IEnumerable<IPublishedContent>> |
The siblings of the content including the node itself.
|
View Source
SiblingsAndSelf<T>(IPublishedContent, IVariationContextAccessor, String)
Declaration
public static IEnumerable<T> SiblingsAndSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
SiblingsAndSelf<T>(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String)
Gets the siblings of the content including the node itself to indicate the position, of a given content type.
Declaration
public static IEnumerable<T> SiblingsAndSelf<T>(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string culture = null)
where T : class, IPublishedContent
Parameters
Returns
Type |
Description |
IEnumerable<T> |
The siblings of the content including the node itself, of the given content type.
|
Type Parameters
Name |
Description |
T |
The content type.
|
View Source
SiblingsAndSelfOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IEnumerable<IPublishedContent> SiblingsAndSelfOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
SiblingsAndSelfOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Gets the siblings of the content including the node itself to indicate the position, of a given content type.
Declaration
public static IEnumerable<IPublishedContent> SiblingsAndSelfOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The siblings of the content including the node itself, of the given content type.
|
View Source
SiblingsOfType(IPublishedContent, IVariationContextAccessor, String, String)
Declaration
public static IEnumerable<IPublishedContent> SiblingsOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string contentTypeAlias, string culture = null)
Parameters
Returns
View Source
SiblingsOfType(IPublishedContent, IVariationContextAccessor, IPublishedCache, INavigationQueryService, String, String)
Gets the siblings of the content, of a given content type.
Declaration
public static IEnumerable<IPublishedContent> SiblingsOfType(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, IPublishedCache publishedCache, INavigationQueryService navigationQueryService, string contentTypeAlias, string culture = null)
Parameters
Returns
Type |
Description |
IEnumerable<IPublishedContent> |
The siblings of the content, of the given content type.
|
View Source
Url(IPublishedContent, IPublishedUrlProvider, String, UrlMode)
Gets the url of the content item.
Declaration
public static string Url(this IPublishedContent content, IPublishedUrlProvider publishedUrlProvider, string culture = null, UrlMode mode = UrlMode.Default)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
UrlSegment(IPublishedContent, IVariationContextAccessor, String)
Gets the URL segment of the content item.
Declaration
public static string UrlSegment(this IPublishedContent content, IVariationContextAccessor variationContextAccessor, string culture = null)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content item.
|
IVariationContextAccessor |
variationContextAccessor |
|
System.String |
culture |
The specific culture to get the URL segment for. If null is used the current culture is used
(Default is null).
|
Returns
Type |
Description |
System.String |
|
View Source
Value(IPublishedContent, IPublishedValueFallback, String, String, String, Fallback, Object)
Gets the value of a content's property identified by its alias, if it exists, otherwise a default value.
Declaration
public static object Value(this IPublishedContent content, IPublishedValueFallback publishedValueFallback, string alias, string culture = null, string segment = null, Fallback fallback = default(Fallback), object defaultValue = null)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
IPublishedValueFallback |
publishedValueFallback |
The published value fallback implementation.
|
System.String |
alias |
The property alias.
|
System.String |
culture |
The variation language.
|
System.String |
segment |
The variation segment.
|
Fallback |
fallback |
Optional fallback strategy.
|
System.Object |
defaultValue |
The default value.
|
Returns
Type |
Description |
System.Object |
The value of the content's property identified by the alias, if it exists, otherwise a default value.
|
View Source
Value<T>(IPublishedContent, IPublishedValueFallback, String, String, String, Fallback, T)
Gets the value of a content's property identified by its alias, converted to a specified type.
Declaration
public static T Value<T>(this IPublishedContent content, IPublishedValueFallback publishedValueFallback, string alias, string culture = null, string segment = null, Fallback fallback = default(Fallback), T defaultValue = null)
Parameters
Type |
Name |
Description |
IPublishedContent |
content |
The content.
|
IPublishedValueFallback |
publishedValueFallback |
The published value fallback implementation.
|
System.String |
alias |
The property alias.
|
System.String |
culture |
The variation language.
|
System.String |
segment |
The variation segment.
|
Fallback |
fallback |
Optional fallback strategy.
|
T |
defaultValue |
The default value.
|
Returns
Type |
Description |
T |
The value of the content's property identified by the alias, converted to the specified type.
|
Type Parameters
Name |
Description |
T |
The target property type.
|