Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IRedirectUrlService

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IRedirectUrlService : IService

    Methods

    View Source

    Delete(Guid)

    Deletes a redirect URL.

    Declaration
    void Delete(Guid id)
    Parameters
    Type Name Description
    Guid id

    The redirect URL identifier.

    View Source

    Delete(IRedirectUrl)

    Deletes a redirect URL.

    Declaration
    void Delete(IRedirectUrl redirectUrl)
    Parameters
    Type Name Description
    IRedirectUrl redirectUrl

    The redirect URL to delete.

    View Source

    DeleteAll()

    Deletes all redirect URLs.

    Declaration
    void DeleteAll()
    View Source

    DeleteContentRedirectUrls(Guid)

    Deletes all redirect URLs for a given content.

    Declaration
    void DeleteContentRedirectUrls(Guid contentKey)
    Parameters
    Type Name Description
    Guid contentKey

    The content unique key.

    View Source

    GetAllRedirectUrls(Int32, Int64, Int32, out Int64)

    Gets all redirect URLs below a given content item.

    Declaration
    IEnumerable<IRedirectUrl> GetAllRedirectUrls(int rootContentId, long pageIndex, int pageSize, out long total)
    Parameters
    Type Name Description
    System.Int32 rootContentId

    The content unique identifier.

    System.Int64 pageIndex

    The page index.

    System.Int32 pageSize

    The page size.

    System.Int64 total

    The total count of redirect URLs.

    Returns
    Type Description
    IEnumerable<IRedirectUrl>

    The redirect URLs.

    View Source

    GetAllRedirectUrls(Int64, Int32, out Int64)

    Gets all redirect URLs.

    Declaration
    IEnumerable<IRedirectUrl> GetAllRedirectUrls(long pageIndex, int pageSize, out long total)
    Parameters
    Type Name Description
    System.Int64 pageIndex

    The page index.

    System.Int32 pageSize

    The page size.

    System.Int64 total

    The total count of redirect URLs.

    Returns
    Type Description
    IEnumerable<IRedirectUrl>

    The redirect URLs.

    View Source

    GetContentRedirectUrls(Guid)

    Gets all redirect URLs for a content item.

    Declaration
    IEnumerable<IRedirectUrl> GetContentRedirectUrls(Guid contentKey)
    Parameters
    Type Name Description
    Guid contentKey

    The content unique key.

    Returns
    Type Description
    IEnumerable<IRedirectUrl>

    All redirect URLs for the content item.

    View Source

    GetMostRecentRedirectUrl(String)

    Gets the most recent redirect URLs corresponding to an Umbraco redirect URL route.

    Declaration
    IRedirectUrl GetMostRecentRedirectUrl(string url)
    Parameters
    Type Name Description
    System.String url

    The Umbraco redirect URL route.

    Returns
    Type Description
    IRedirectUrl

    The most recent redirect URLs corresponding to the route.

    View Source

    GetMostRecentRedirectUrl(String, String)

    Gets the most recent redirect URLs corresponding to an Umbraco redirect URL route.

    Declaration
    IRedirectUrl GetMostRecentRedirectUrl(string url, string culture)
    Parameters
    Type Name Description
    System.String url

    The Umbraco redirect URL route.

    System.String culture

    The culture of the request.

    Returns
    Type Description
    IRedirectUrl

    The most recent redirect URLs corresponding to the route.

    View Source

    GetMostRecentRedirectUrlAsync(String, String)

    Gets the most recent redirect URLs corresponding to an Umbraco redirect URL route.

    Declaration
    virtual Task<IRedirectUrl> GetMostRecentRedirectUrlAsync(string url, string culture)
    Parameters
    Type Name Description
    System.String url

    The Umbraco redirect URL route.

    System.String culture

    The culture of the request.

    Returns
    Type Description
    System.Threading.Tasks.Task<IRedirectUrl>

    The most recent redirect URLs corresponding to the route.

    View Source

    Register(String, Guid, String)

    Registers a redirect URL.

    Declaration
    void Register(string url, Guid contentKey, string culture = null)
    Parameters
    Type Name Description
    System.String url

    The Umbraco URL route.

    Guid contentKey

    The content unique key.

    System.String culture

    The culture.

    Remarks

    Is a proper Umbraco route eg /path/to/foo or 123/path/tofoo.

    View Source

    SearchRedirectUrls(String, Int64, Int32, out Int64)

    Searches for all redirect URLs that contain a given search term in their URL property.

    Declaration
    IEnumerable<IRedirectUrl> SearchRedirectUrls(string searchTerm, long pageIndex, int pageSize, out long total)
    Parameters
    Type Name Description
    System.String searchTerm

    The term to search for.

    System.Int64 pageIndex

    The page index.

    System.Int32 pageSize

    The page size.

    System.Int64 total

    The total count of redirect URLs.

    Returns
    Type Description
    IEnumerable<IRedirectUrl>

    The redirect URLs.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • Delete(Guid)
      • Delete(IRedirectUrl)
      • DeleteAll()
      • DeleteContentRedirectUrls(Guid)
      • GetAllRedirectUrls(Int32, Int64, Int32, out Int64)
      • GetAllRedirectUrls(Int64, Int32, out Int64)
      • GetContentRedirectUrls(Guid)
      • GetMostRecentRedirectUrl(String)
      • GetMostRecentRedirectUrl(String, String)
      • GetMostRecentRedirectUrlAsync(String, String)
      • Register(String, Guid, String)
      • SearchRedirectUrls(String, Int64, Int32, out Int64)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX