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.
Hace 2 años
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!!
Hace 2 años
Do you add ViewLocationExpender to your plugin ? Just keep same folder structure and file name inside plugin that you want to overwrite
Hace 2 años
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!
Hace 2 años
Did you try and replace

    Layout = "_AdminLayout";

With

    Layout = "~/Themes/MyCustomTheme/Areas/Admin/Views/Shared/_AdminLayout.cshtml"
Hace 2 años
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
Hace 2 años
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?
Hace 2 años
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
Hace 2 años
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.