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 yıl önce
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 yıl önce
Do you add ViewLocationExpender to your plugin ? Just keep same folder structure and file name inside plugin that you want to overwrite
2 yıl önce
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 yıl önce
Did you try and replace

    Layout = "_AdminLayout";

With

    Layout = "~/Themes/MyCustomTheme/Areas/Admin/Views/Shared/_AdminLayout.cshtml"
2 yıl önce
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 yıl önce
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 yıl önce
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 yıl önce
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.