rycrl_bljd wrote:It's like this, I got 2 controllers in my plugin. Controller1 and Controller2. I got a List view on both of my contollers.
Controller1 action List is called from the configure provider of the plugin manager.
Its view still shows the nopcommerce admin master view.
Controller2 action List is called from the List in Controller1. The Url changed from ../admin/Controller1/List to ../plugin/Controller2/List. On the List view, the admin master view cannot be used. The view is just a plain white background when I access it.
I don't think my code can help if i show it here.
I think this is the reason why the default plugins use a single controller.
Ok. I can't really understand your explanation, but let me guess:
You got 2 controllers, both contains a List action. One List action is referenced by the Configure plugin route, and the View for this action has a link to the List action of Controller 2. But on the List action of Controller 2, you can't see the default Administration theme, all you see is a plain, unstyled page with a white background.
If this is the case, and what you want to do is for the List action in Controller 2 to have the Administration theme, just add the following code to your Controller 2 Views:
@{
Layout = "~/Administration/Views/Shared/_AdminLayout.cshtml";
}
:)