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.
Il y a 5 ans
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
Il y a 5 ans
Hi,

You have to use this code:

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

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

Layout = "_ConfigurePlugin";
Il y a 3 ans
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.