Override admin area views in custom theme Nop 4.5

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 năm cách đây
Hi!,

After searching various forums for ways to override the admin area views and trying multiple possible solutions, I've not gotten any positive results.

I've the following route
Themes/MyCustomTheme/Areas/Admin/Views/Shared/_AdminLayout.cshtml


I've managed to overwrite the Register view,
Themes/MyCustomTheme/Views/Customer/Register.cshtml 
and it works as expected

How can I override the admin area views?

Thanks!!
2 năm cách đây
Do you add ViewLocationExpender to your plugin ? Just keep same folder structure and file name inside plugin that you want to overwrite
2 năm cách đây
Hi Rashed,

Thanks for your early response, but i'm not using a custom plugin, i need only override the
_AdminLayot view located in
Nop.Web/Areas/Admin/Views/Shared/_AdminLayot.cshtml 
and replace it for my _AdminLayout.cshtml located in
Nop.Web/Themes/MyCustomTheme/Areas/Admin/Views/Shared/_AdminLayout.cshtml


Regards!
2 năm cách đây
Did you try and replace

    Layout = "_AdminLayout";

With

    Layout = "~/Themes/MyCustomTheme/Areas/Admin/Views/Shared/_AdminLayout.cshtml"
2 năm cách đây
it should work ! may be any reference issue inside of your layout. please remove everything and put "Hello World" text to check that your _AdminLayout.cshtml is working or not
2 năm cách đây
Hi,

I've tried the solution proposed by Yidna and it works correctly, but that would mean changing the source code of nopcommerce, and when I update the version I'll lose all the changes and I'll have to modify my changes again.

Is there a way to override the admin area views without having to change nopcommerce source code?
2 năm cách đây
Rashed Khan wrote:
Do you add ViewLocationExpender to your plugin ? Just keep same folder structure and file name inside plugin that you want to overwrite


Yes by building a Plugin as noted
2 năm cách đây
Hi,

Great, I'm grateful for your help.

Regards!!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.