Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IPublishedContentQuery

    Query methods used for accessing strongly typed content in templates.

    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public interface IPublishedContentQuery

    Methods

    View Source

    Content(IEnumerable<Guid>)

    Declaration
    IEnumerable<IPublishedContent> Content(IEnumerable<Guid> ids)
    Parameters
    Type Name Description
    IEnumerable<Guid> ids
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Content(IEnumerable<int>)

    Declaration
    IEnumerable<IPublishedContent> Content(IEnumerable<int> ids)
    Parameters
    Type Name Description
    IEnumerable<int> ids
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Content(IEnumerable<object>)

    Declaration
    IEnumerable<IPublishedContent> Content(IEnumerable<object> ids)
    Parameters
    Type Name Description
    IEnumerable<object> ids
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Content(Guid)

    Declaration
    IPublishedContent? Content(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    IPublishedContent
    View Source

    Content(int)

    Declaration
    IPublishedContent? Content(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    IPublishedContent
    View Source

    Content(object)

    Declaration
    IPublishedContent? Content(object id)
    Parameters
    Type Name Description
    object id
    Returns
    Type Description
    IPublishedContent
    View Source

    Content(Udi)

    Declaration
    IPublishedContent? Content(Udi id)
    Parameters
    Type Name Description
    Udi id
    Returns
    Type Description
    IPublishedContent
    View Source

    ContentAtRoot()

    Declaration
    IEnumerable<IPublishedContent> ContentAtRoot()
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Media(IEnumerable<Guid>)

    Declaration
    IEnumerable<IPublishedContent> Media(IEnumerable<Guid> ids)
    Parameters
    Type Name Description
    IEnumerable<Guid> ids
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Media(IEnumerable<int>)

    Declaration
    IEnumerable<IPublishedContent> Media(IEnumerable<int> ids)
    Parameters
    Type Name Description
    IEnumerable<int> ids
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Media(IEnumerable<object>)

    Declaration
    IEnumerable<IPublishedContent> Media(IEnumerable<object> ids)
    Parameters
    Type Name Description
    IEnumerable<object> ids
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Media(Guid)

    Declaration
    IPublishedContent? Media(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    IPublishedContent
    View Source

    Media(int)

    Declaration
    IPublishedContent? Media(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    IPublishedContent
    View Source

    Media(object)

    Declaration
    IPublishedContent? Media(object id)
    Parameters
    Type Name Description
    object id
    Returns
    Type Description
    IPublishedContent
    View Source

    Media(Udi)

    Declaration
    IPublishedContent? Media(Udi id)
    Parameters
    Type Name Description
    Udi id
    Returns
    Type Description
    IPublishedContent
    View Source

    MediaAtRoot()

    Declaration
    IEnumerable<IPublishedContent> MediaAtRoot()
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    Search(IQueryExecutor)

    Executes the query and converts the results to PublishedSearchResult.

    Declaration
    IEnumerable<PublishedSearchResult> Search(IQueryExecutor query)
    Parameters
    Type Name Description
    IQueryExecutor query

    The query.

    Returns
    Type Description
    IEnumerable<PublishedSearchResult>

    The search results.

    View Source

    Search(IQueryExecutor, int, int, out long)

    Executes the query and converts the results to PublishedSearchResult.

    Declaration
    IEnumerable<PublishedSearchResult> Search(IQueryExecutor query, int skip, int take, out long totalRecords)
    Parameters
    Type Name Description
    IQueryExecutor query

    The query.

    int skip

    The amount of results to skip.

    int take

    The amount of results to take/return.

    long totalRecords

    The total amount of records.

    Returns
    Type Description
    IEnumerable<PublishedSearchResult>

    The search results.

    View Source

    Search(IQueryExecutor, int, int, out long, string?)

    Executes the query and converts the results to PublishedSearchResult.

    Declaration
    IEnumerable<PublishedSearchResult> Search(IQueryExecutor query, int skip, int take, out long totalRecords, string? culture)
    Parameters
    Type Name Description
    IQueryExecutor query

    The query.

    int skip

    The amount of results to skip.

    int take

    The amount of results to take/return.

    long totalRecords

    The total amount of records.

    string culture

    The culture (defaults to a culture insensitive search).

    Returns
    Type Description
    IEnumerable<PublishedSearchResult>

    The search results.

    Remarks

    While enumerating results, the ambient culture is changed to be the searched culture.

    View Source

    Search(string, int, int, out long, string, string, ISet<string>?)

    Searches content.

    Declaration
    IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = "ExternalIndex", ISet<string>? loadedFields = null)
    Parameters
    Type Name Description
    string term

    The term to search.

    int skip

    The amount of results to skip.

    int take

    The amount of results to take/return.

    long totalRecords

    The total amount of records.

    string culture

    The culture (defaults to a culture insensitive search).

    string indexName

    The name of the index to search (defaults to ExternalIndexName).

    ISet<string> loadedFields

    This parameter is no longer used, because the results are loaded from the published snapshot using the single item ID field.

    Returns
    Type Description
    IEnumerable<PublishedSearchResult>

    The search results.

    Remarks

    When the culture is not specified or is *, all cultures are searched. To search for only invariant documents and fields use null. When searching on a specific culture, all culture specific fields are searched for the provided culture and all invariant fields for all documents.

    While enumerating results, the ambient culture is changed to be the searched culture.

    View Source

    Search(string, string, string)

    Searches content.

    Declaration
    IEnumerable<PublishedSearchResult> Search(string term, string culture = "*", string indexName = "ExternalIndex")
    Parameters
    Type Name Description
    string term

    The term to search.

    string culture

    The culture (defaults to a culture insensitive search).

    string indexName

    The name of the index to search (defaults to ExternalIndexName).

    Returns
    Type Description
    IEnumerable<PublishedSearchResult>

    The search results.

    Remarks

    When the culture is not specified or is *, all cultures are searched. To search for only invariant documents and fields use null. When searching on a specific culture, all culture specific fields are searched for the provided culture and all invariant fields for all documents.

    While enumerating results, the ambient culture is changed to be the searched culture.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX