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/content-type-filters.md
+64-11Lines changed: 64 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: Describes how to use Content Type Filters to restrict the allowed content options available to editors.
2
+
description: Describes how to use Allowed Content Type Filters to restrict the allowed content options available to editors.
3
3
---
4
4
5
5
# Filtering Allowed Content Types
@@ -23,27 +23,45 @@ There are two methods you can implement:
23
23
* One for filtering the content types allowed at the content root
24
24
* One for the content types allowed below a given parent node.
25
25
26
-
If you don't want to filter using one of the two approaches, you can return the provided collection unmodified.
26
+
If you don't want to filter using one of the two approaches, you can omit the implementation of that method. The default implementation will return the provided collection unmodified.
27
27
28
28
### Example Use Case
29
29
30
-
The following example shows a typical use case. Often websites will have a "Home Page" Document Type which is created at the root. Normally, only one of these is required. You can enforce that using the following Content Type Filter.
30
+
The following example shows an illustrative but also typical use case. Often websites will have a "Home Page" Document Type which is created at the root. Normally, only one of these is required. You can enforce that using the following Content Type Filter.
31
31
32
-
The code below is querying the existing content available at the root. Normally you can create a "Home Page" here, but if one already exists that option is removed:
32
+
The code below is querying the existing content available at the root. Normally you can create a "Home Page" here, but if one already exists that option is removed.
33
+
34
+
It then shows how to limit the allowed children by only permitting a single "Landing Page" under the "Home Page" Document Type.
0 commit comments