Skip to content

Commit b461fcc

Browse files
authored
Updated some grammar etc
1 parent 998e20c commit b461fcc

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

15/umbraco-cms/reference/content-type-filters.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,32 @@ description: Describes how to use Content Type Filters to restrict the allowed c
44

55
# Filtering Allowed Content Types
66

7-
When creating content editors are presented with a dialog where they select the type of content they want to create. The options available are defined when setting up the document, media and member types in the _Settings_ section.
7+
When content editors add new content they are presented with a dialog where they must select the type of content they want to create. The options available are defined when setting up the Document, Media, and Member types in the **Settings** section.
88

9-
Sometimes implementors or packages have a requirement to use some additional logic to determine which options are available.
9+
Implementors and package creators can add additional logic to determine which options are available to the editors.
1010

11-
This is possible using content type filters.
11+
This is possible using Content Type Filters.
1212

1313
{% hint style="info" %}
14-
The uses cases supported here are similar to those where the `SendingAllowedChildrenNotification` would be used in Umbraco 13 or earlier.
14+
The use cases supported here are similar to those where the `SendingAllowedChildrenNotification` would be used in Umbraco 13 or earlier.
1515
{% endhint %}
1616

1717
## Implementing a Content Type Filter
1818

19-
To create a content type filter you use a class that implements the `IContentTypeFilter` interface (found in the `Umbraco.Cms.Core.Services.Filters` namespace).
19+
To create a Content Type Filter you use a class that implements the `IContentTypeFilter` interface (found in the `Umbraco.Cms.Core.Services.Filters` namespace).
2020

21-
There are two methods you can implement. One is for filtering the content types allowed at the content root. The other is for the content types allowed below a given parent node.
21+
There are two methods you can implement:
2222

23-
If you don't want to filter for one or other method, you can return the provided collection unmodified.
23+
* One for filtering the content types allowed at the content root
24+
* One for the content types allowed below a given parent node.
25+
26+
If you don't want to filter using one of the two approaches, you can return the provided collection unmodified.
27+
28+
### Example Use case
2429

2530
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.
2631

27-
Here we are querying the existing content available at the root. Normally we can create a "Home Page" here, but if one already exists, we remove the option:
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:
2833

2934
```csharp
3035
internal class OneHomePageOnlyContentTypeFilter : IContentTypeFilter
@@ -57,9 +62,9 @@ internal class OneHomePageOnlyContentTypeFilter : IContentTypeFilter
5762
}
5863
```
5964

60-
Content Type Filters are registered as a collection, so it's possible to have more than one either in the solution or an installed package.
65+
Content Type Filters are registered as a collection, making it possible to have more than one in the solution or an installed package.
6166

62-
You use a composer to register the filters:
67+
The filters need to be registered in a composer:
6368

6469
```csharp
6570
public class MyComposer : IComposer

0 commit comments

Comments
 (0)