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: 14/umbraco-cms/tutorials/custom-error-page.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,13 +30,11 @@ This has been moved to a separate article: [Create a custom maintenance page](cr
30
30
31
31
A 404 error occurs when a requested page cannot be found—typically because the content has been deleted, the URL path has changed, or the visitor typed an invalid path. In Umbraco, you can create and configure custom 404 pages using content from the backoffice.
32
32
33
-
This section shows how to set up a custom 404 page:
34
-
35
33
### Create a 404 page in the backoffice
36
34
37
35
1. Go to the **Settings** section in the Umbraco backoffice.
38
36
2. Create a new **Document Type with Template**.
39
-
3. Name the Document Type **ErrorPage404**.
37
+
3. Name the Document Type *ErrorPage404*.
40
38
4.[Optional] Add any custom properties you want — though most 404 pages are static.
41
39
5. Click **Save**.
42
40
6. Go to the **Templates** folder.
@@ -49,7 +47,7 @@ This section shows how to set up a custom 404 page:
49
47
2. Name it **Statuscodes**.
50
48
3. Go to the **Structure** Workspace view.
51
49
* Enable **Allow at root**.
52
-
* Add the **ErrorPage404** Document Type as an **Allowed child node types**.
50
+
* Add the *ErrorPage404* Document Type as an **Allowed child node types**.
53
51
* Click **Choose**.
54
52
4. Click **Save**.
55
53
@@ -58,9 +56,10 @@ This section shows how to set up a custom 404 page:
58
56
1. Go to the **Content** section.
59
57
2. Create a new content node based on the **Statuscodes** Document Type and name it **Statuscodes**.
60
58
3. Click **Save** or **Save and Publish**.
61
-
4. Under it, create a child node using the **ErrorPage404** Document Type.
59
+
4. Under it, create a child node using the *ErrorPage404* Document Type.
62
60
5. Name it *Page 404 Not Found* or similar.
63
61
* This will be the content shown when a 404 error occurs.
62
+
6. Click **Save** or **Save and Publish**.
64
63
65
64
### Configure the Error Page in `appsettings.json` file
66
65
@@ -111,11 +110,11 @@ Each entry maps a culture to its specific 404 page using the content’s GUID.
111
110
112
111
### Set a custom 404 page using IContentLastChanceFinder
113
112
114
-
It is also possible to set up a 404 error page programmatically using `IContentLastChanceFinder`. To learn more about `IContentLastChanceFinder` read the [Custom Routing](../implementation/custom-routing/)article.
113
+
It is also possible to set up a 404 error page programmatically using `IContentLastChanceFinder`. To learn more about `IContentLastChanceFinder`, read the [Custom Routing](../implementation/custom-routing/)article.
115
114
116
-
Before following this example, follow the [Create a 404 page in the backoffice](custom-error-page.md#create-a-404-page-in-the-backoffice) part. The example below will use the `errorPage404` alias of the Document Type to find and display the error page.
115
+
Before following this example, follow the [Create a 404 page in the backoffice](custom-error-page.md#create-a-404-page-in-the-backoffice) part. The example below will use the *errorPage404* alias of the Document Type to find and display the error page.
117
116
118
-
1. Create a new `.cs` file called `Error404Page` at the root of the project.
117
+
1. Create a new `.cs` file called *Error404Page* at the root of the project.
119
118
2. Add the following code to the newly created class:
Copy file name to clipboardExpand all lines: 15/umbraco-cms/tutorials/custom-error-page.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,13 +30,11 @@ This has been moved to a separate article: [Create a custom maintenance page](cr
30
30
31
31
A 404 error occurs when a requested page cannot be found—typically because the content has been deleted, the URL path has changed, or the visitor typed an invalid path. In Umbraco, you can create and configure custom 404 pages using content from the backoffice.
32
32
33
-
This section shows how to set up a custom 404 page:
34
-
35
33
### Create a 404 page in the backoffice
36
34
37
35
1. Go to the **Settings** section in the Umbraco backoffice.
38
36
2. Create a new **Document Type with Template**.
39
-
3. Name the Document Type **ErrorPage404**.
37
+
3. Name the Document Type *ErrorPage404*.
40
38
4.[Optional] Add any custom properties you want — though most 404 pages are static.
41
39
5. Click **Save**.
42
40
6. Go to the **Templates** folder.
@@ -49,7 +47,7 @@ This section shows how to set up a custom 404 page:
49
47
2. Name it **Statuscodes**.
50
48
3. Go to the **Structure** Workspace view.
51
49
* Enable **Allow at root**.
52
-
* Add the **ErrorPage404** Document Type as an **Allowed child node types**.
50
+
* Add the *ErrorPage404* Document Type as an **Allowed child node types**.
53
51
* Click **Choose**.
54
52
4. Click **Save**.
55
53
@@ -58,9 +56,10 @@ This section shows how to set up a custom 404 page:
58
56
1. Go to the **Content** section.
59
57
2. Create a new content node based on the **Statuscodes** Document Type and name it **Statuscodes**.
60
58
3. Click **Save** or **Save and Publish**.
61
-
4. Under it, create a child node using the **ErrorPage404** Document Type.
59
+
4. Under it, create a child node using the *ErrorPage404* Document Type.
62
60
5. Name it *Page 404 Not Found* or similar.
63
61
* This will be the content shown when a 404 error occurs.
62
+
6. Click **Save** or **Save and Publish**.
64
63
65
64
### Configure the Error Page in `appsettings.json` file
66
65
@@ -111,11 +110,11 @@ Each entry maps a culture to its specific 404 page using the content’s GUID.
111
110
112
111
### Set a custom 404 page using IContentLastChanceFinder
113
112
114
-
It is also possible to set up a 404 error page programmatically using `IContentLastChanceFinder`. To learn more about `IContentLastChanceFinder` read the [Custom Routing](../implementation/custom-routing/)article.
113
+
It is also possible to set up a 404 error page programmatically using `IContentLastChanceFinder`. To learn more about `IContentLastChanceFinder`, read the [Custom Routing](../implementation/custom-routing/)article.
115
114
116
-
Before following this example, follow the [Create a 404 page in the backoffice](custom-error-page.md#create-a-404-page-in-the-backoffice) part. The example below will use the `errorPage404` alias of the Document Type to find and display the error page.
115
+
Before following this example, follow the [Create a 404 page in the backoffice](custom-error-page.md#create-a-404-page-in-the-backoffice) part. The example below will use the *errorPage404* alias of the Document Type to find and display the error page.
117
116
118
-
1. Create a new `.cs` file called `Error404Page` at the root of the project.
117
+
1. Create a new `.cs` file called *Error404Page* at the root of the project.
119
118
2. Add the following code to the newly created class:
Copy file name to clipboardExpand all lines: 16/umbraco-cms/tutorials/custom-error-page.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,13 +30,11 @@ This has been moved to a separate article: [Create a custom maintenance page](cr
30
30
31
31
A 404 error occurs when a requested page cannot be found—typically because the content has been deleted, the URL path has changed, or the visitor typed an invalid path. In Umbraco, you can create and configure custom 404 pages using content from the backoffice.
32
32
33
-
This section shows how to set up a custom 404 page:
34
-
35
33
### Create a 404 page in the backoffice
36
34
37
35
1. Go to the **Settings** section in the Umbraco backoffice.
38
36
2. Create a new **Document Type with Template**.
39
-
3. Name the Document Type **ErrorPage404**.
37
+
3. Name the Document Type *ErrorPage404*.
40
38
4.[Optional] Add any custom properties you want — though most 404 pages are static.
41
39
5. Click **Save**.
42
40
6. Go to the **Templates** folder.
@@ -49,7 +47,7 @@ This section shows how to set up a custom 404 page:
49
47
2. Name it **Statuscodes**.
50
48
3. Go to the **Structure** Workspace view.
51
49
* Enable **Allow at root**.
52
-
* Add the **ErrorPage404** Document Type as an **Allowed child node types**.
50
+
* Add the *ErrorPage404* Document Type as an **Allowed child node types**.
53
51
* Click **Choose**.
54
52
4. Click **Save**.
55
53
@@ -58,9 +56,10 @@ This section shows how to set up a custom 404 page:
58
56
1. Go to the **Content** section.
59
57
2. Create a new content node based on the **Statuscodes** Document Type and name it **Statuscodes**.
60
58
3. Click **Save** or **Save and Publish**.
61
-
4. Under it, create a child node using the **ErrorPage404** Document Type.
59
+
4. Under it, create a child node using the *ErrorPage404* Document Type.
62
60
5. Name it *Page 404 Not Found* or similar.
63
61
* This will be the content shown when a 404 error occurs.
62
+
6. Click **Save** or **Save and Publish**.
64
63
65
64
### Configure the Error Page in `appsettings.json` file
66
65
@@ -111,11 +110,11 @@ Each entry maps a culture to its specific 404 page using the content’s GUID.
111
110
112
111
### Set a custom 404 page using IContentLastChanceFinder
113
112
114
-
It is also possible to set up a 404 error page programmatically using `IContentLastChanceFinder`. To learn more about `IContentLastChanceFinder` read the [Custom Routing](../implementation/custom-routing/)article.
113
+
It is also possible to set up a 404 error page programmatically using `IContentLastChanceFinder`. To learn more about `IContentLastChanceFinder`, read the [Custom Routing](../implementation/custom-routing/)article.
115
114
116
-
Before following this example, follow the [Create a 404 page in the backoffice](custom-error-page.md#create-a-404-page-in-the-backoffice) part. The example below will use the `errorPage404` alias of the Document Type to find and display the error page.
115
+
Before following this example, follow the [Create a 404 page in the backoffice](custom-error-page.md#create-a-404-page-in-the-backoffice) part. The example below will use the *errorPage404* alias of the Document Type to find and display the error page.
117
116
118
-
1. Create a new `.cs` file called `Error404Page` at the root of the project.
117
+
1. Create a new `.cs` file called *Error404Page* at the root of the project.
119
118
2. Add the following code to the newly created class:
0 commit comments