How can I use _AdminLayout page inside my Plugin View in nopCommerce 4.10 ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I have created one Plugin for nopCommerce 4.10. In that I want a view which will have kendo ui in Administration area. if I am using using...
@{
   Layout = "_AdminLayout";
}

I am getting error. _AdminLayout can't found (something like that).

Please help me with this.. Thanx
5 years ago
Hi,

You have to use this code:

@{
   Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}
5 years ago
Not Working
4 years ago
Sorry... It is working ... I had some attribute problem.
4 years ago
Hi,

If you create a Plugin, you don't use the default layout of Plugin.

Layout = "_ConfigurePlugin";
3 years ago
Also, make sure you decorate the action name as well with the below
[AuthorizeAdmin]
[Area(AreaNames.Admin)]
public virtual IActionResult MethodName()
{
}
If  you are making any jQuery.ajax calls from plugin, then also you need to decorate action in the same way that you did above
eg.
[AuthorizeAdmin]
[Area(AreaNames.Admin)]
[HttpGet]
public JsonResult GetDetailsById(int id)
{
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.