Defines operations for handling document URLs.
Namespace: Umbraco.Cms.Core.Services Assembly: Umbraco.Core.dll Syntaxpublic interface IDocumentUrlService
Methods View Source CreateOrUpdateUrlSegmentsAsync(Guid)
Creates or updates the URL segments for a single document.
DeclarationTask CreateOrUpdateUrlSegmentsAsync(Guid key)
Parameters Type Name Description Guid key
The document key.
Returns View Source CreateOrUpdateUrlSegmentsAsync(IEnumerable<IContent>)Creates or updates the URL segments for a collection of documents.
DeclarationTask CreateOrUpdateUrlSegmentsAsync(IEnumerable<IContent> documents)
Parameters Type Name Description IEnumerable<IContent> documents
The document collection.
Returns View Source CreateOrUpdateUrlSegmentsWithDescendantsAsync(Guid)Creates or updates the URL segments for a document and it's descendants.
DeclarationTask CreateOrUpdateUrlSegmentsWithDescendantsAsync(Guid key)
Parameters Type Name Description Guid key
The document key.
Returns View Source DeleteUrlsFromCacheAsync(IEnumerable<Guid>)Deletes all URLs from the cache for a collection of document keys.
DeclarationTask DeleteUrlsFromCacheAsync(IEnumerable<Guid> documentKeys)
Parameters Type Name Description IEnumerable<Guid> documentKeys
The collection of document keys.
Returns View Source GetDocumentKeyByRoute(String, String, Nullable<Int32>, Boolean)Gets a document key by route.
DeclarationGuid? GetDocumentKeyByRoute(string route, string culture, int? documentStartNodeId, bool isDraft)
Parameters Type Name Description System.String route
The route.
System.String cultureThe culture code.
System.Nullable<System.Int32> documentStartNodeIdThe document start node Id.
System.Boolean isDraftWhether to get the url of the draft or published document.
Returns Type Description System.Nullable<Guid>The document key, or null if not found.
View Source GetLegacyRouteFormat(Guid, String, Boolean)Gets the legacy route format for a document key and culture.
Declarationstring GetLegacyRouteFormat(Guid key, string culture, bool isDraft)
Parameters Type Name Description Guid key
The key of the document.
System.String cultureThe culture code.
System.Boolean isDraftWhether to get the url of the draft or published document.
Returns Type Description System.String View Source GetUrlSegment(Guid, String, Boolean)Gets a single URL segment from a document key and culture. Preview urls are returned if isDraft is true.
Declarationstring GetUrlSegment(Guid documentKey, string culture, bool isDraft)
Parameters Type Name Description Guid documentKey
The key of the document.
System.String cultureThe culture code.
System.Boolean isDraftWhether to get the url of the draft or published document.
Returns Type Description System.StringA URL segment for the document.
View Source GetUrlSegments(Guid, String, Boolean)Gets the URL segments from a document key and culture. Preview urls are returned if isDraft is true.
Declarationvirtual IEnumerable<string> GetUrlSegments(Guid documentKey, string culture, bool isDraft)
Parameters Type Name Description Guid documentKey
The key of the document.
System.String cultureThe culture code.
System.Boolean isDraftWhether to get the url of the draft or published document.
Returns Type Description IEnumerable<System.String>The URL segments for the document.
View Source HasAny()Gets a value indicating whether any URLs have been cached.
Declaration Returns Type Description System.Boolean View Source InitAsync(Boolean, CancellationToken)Initializes the service and ensure the content in the database is correct with the current configuration.
DeclarationTask InitAsync(bool forceEmpty, CancellationToken cancellationToken)
Parameters Type Name Description System.Boolean forceEmpty
Forces an early return when we know there are no routes (i.e. on install).
CancellationToken cancellationTokenThe cancellation token.
Returns View Source ListUrlsAsync(Guid)Gets all the URLs for a given content key.
DeclarationTask<IEnumerable<UrlInfo>> ListUrlsAsync(Guid contentKey)
Parameters Type Name Description Guid contentKey
The content key.
Returns Type Description Task<IEnumerable<UrlInfo>> View Source RebuildAllUrlsAsync()Rebuilds all document URLs.
DeclarationTask RebuildAllUrlsAsync()
Returns
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4