Jyothish
Jyothish

Reputation: 561

Orchard cms, admin layout missing

I have an admin controller to manage the appointments from the website, the routes I created as follows,

    public IEnumerable<RouteDescriptor> GetRoutes()
    {
        return new[] {

            new RouteDescriptor 
                {
                    Route = new Route(
                        "Admin/Bt.Forms/Appointments",
                        new RouteValueDictionary {
                                                    {"area", "Bt.Forms"},
                                                    {"controller", "AppointmentAdmin"},
                                                    {"action", "Index"}
                                                },
                        new RouteValueDictionary(),
                        new RouteValueDictionary {
                                                    {"area", "Bt.Forms"}
                                                },
                        new MvcRouteHandler())
              },
        };
    }

When navigated to the url, the admin layout and side menus are lost, can anybody enlighten me what I might be missing, Thanks in advance,

-George

Upvotes: 1

Views: 444

Answers (1)

Behnam Esmaili
Behnam Esmaili

Reputation: 5967

simply decorate your controller action with [Themed] attribute.like this :

[Themed]
[Admin]
public ActionResult MyAction (){


     return View();
}

Upvotes: 1

Related Questions