From c7bd9d87c2283cad96ca3cd769dabe67ca2357cd Mon Sep 17 00:00:00 2001 From: Evandro Mota de Souza <118752611+EvandroMotaSouza@users.noreply.github.com> Date: Mon, 21 Nov 2022 14:03:07 -0300 Subject: [PATCH 1/2] UI Customization Guide - ABP Tag Helpers explained. Explaining how to perform the necessary imports to use ABP Tag Helpers in UI Customization Guide. --- docs/en/UI/AspNetCore/Customization-User-Interface.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/UI/AspNetCore/Customization-User-Interface.md b/docs/en/UI/AspNetCore/Customization-User-Interface.md index 64184bf806..f3920d27da 100644 --- a/docs/en/UI/AspNetCore/Customization-User-Interface.md +++ b/docs/en/UI/AspNetCore/Customization-User-Interface.md @@ -63,6 +63,8 @@ The account module defines a `Login.cshtml` file under the `Pages/Account` folde You typically want to copy the original `.cshtml` file of the module, then make the necessary changes. You can find the original file [here](https://github.com/abpframework/abp/blob/dev/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml). Do not copy the `Login.cshtml.cs` file which is the code behind file for the razor page and we don't want to override it yet (see the next section). +If the page you want to override contains [ABP Tag Helpers](../Tag-Helpers/Index.md), don't forget to add ViewImports lines from [here](https://github.com/abpframework/abp/blob/dev/modules/account/src/Volo.Abp.Account.Web/Pages/Account/_ViewImports.cshtml) to your ViewImports. + That's all, you can change the file content however you like. ### Completely Overriding a Razor Page From 062d96c1d00b91e4a3dbc4e82781b7bd8efe6542 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 23 Nov 2022 15:27:30 +0800 Subject: [PATCH 2/2] Update Customization-User-Interface.md --- docs/en/UI/AspNetCore/Customization-User-Interface.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/en/UI/AspNetCore/Customization-User-Interface.md b/docs/en/UI/AspNetCore/Customization-User-Interface.md index f3920d27da..8b5a065e86 100644 --- a/docs/en/UI/AspNetCore/Customization-User-Interface.md +++ b/docs/en/UI/AspNetCore/Customization-User-Interface.md @@ -63,7 +63,14 @@ The account module defines a `Login.cshtml` file under the `Pages/Account` folde You typically want to copy the original `.cshtml` file of the module, then make the necessary changes. You can find the original file [here](https://github.com/abpframework/abp/blob/dev/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml). Do not copy the `Login.cshtml.cs` file which is the code behind file for the razor page and we don't want to override it yet (see the next section). -If the page you want to override contains [ABP Tag Helpers](../Tag-Helpers/Index.md), don't forget to add ViewImports lines from [here](https://github.com/abpframework/abp/blob/dev/modules/account/src/Volo.Abp.Account.Web/Pages/Account/_ViewImports.cshtml) to your ViewImports. +> Don't forget to add [_ViewImports.cshtml](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/layout?view=aspnetcore-7.0#importing-shared-directives) if the page you want to override contains [ABP Tag Helpers](../Tag-Helpers/Index.md). + +````csharp +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling +```` That's all, you can change the file content however you like.