You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-cms/reference/routing/request-pipeline/outbound-pipeline.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,23 +16,30 @@ To explain things we will use the following content tree:
16
16
17
17
## 1. Create segments
18
18
19
-
When the URL is constructed, Umbraco will convert every node in the tree into a segment. Each published Content item has a corresponding URL segment.
19
+
When the URL is constructed, Umbraco will convert every document node in the tree into a segment. Each published document has a corresponding URL segment.
20
20
21
21
In our example "Our Products" will become "our-products" and "Swibble" will become "swibble".
22
22
23
23
The segments are created by the "Url Segment provider"
24
24
25
25
### Url Segment Provider
26
26
27
-
The DI container of an Umbraco implementation contains a collection of `UrlSegmentProviders`. This collection is populated during Umbraco boot up. Umbraco ships with a 'DefaultUrlSegmentProvider' - but custom implementations can be added to the collection.
27
+
The DI container of an Umbraco implementation contains a collection of `UrlSegmentProviders`. This collection is populated during Umbraco start up. Umbraco ships with a `DefaultUrlSegmentProvider` and custom implementations can be added to the collection.
28
28
29
-
When the `GetUrlSegment` extension method is called for a content item + culture combination, each registered `IUrlSegmentProvider` in the collection is executed in 'collection order'. This continues until a particular `UrlSegmentProvider` returns a segment value for the content, and no further `UrlSegmentProviders` in the collection will be executed. If no segment is returned by any provider in the collection a `DefaultUrlSegmentProvider` will be used to create a segment. This ensures that a segment is always created, like when a default provider is removed from a collection without a new one being added.
29
+
When the segments are requested for a document and culture combination, each registered `IUrlSegmentProvider` in the collection is executed in 'collection order'. Each provider can provide a segment for the document and culture, or return null.
30
+
31
+
Each URL segment provider is configured to either terminate after providing a segment or to allow other segments providers to be executed. When a terminating provider return a segment value for the document and culture, no further `UrlSegmentProviders` in the collection will be executed.
32
+
33
+
If the provider does not terminate, other providers are able to return segments as well. In this way, multiple segments can be returned for a single document and culture combination. Along with the use of custom `IUrlProvider` and `IContentFinder` instances, considerable flexibility in the generated URLs can be achieved.
34
+
35
+
If no segment is returned by any provider in the collection a `DefaultUrlSegmentProvider` will be used to create a segment. This ensures that a segment is always created, even when a default provider is removed from a collection without a new one being added.
30
36
31
37
To create a new Url Segment Provider, implement the following interface:
0 commit comments