This project is read-only.

overriding admin theme Core/Dashboard/Views/Admin/Index.cshtml

Topics: Customizing Orchard, Writing themes
Dec 26, 2011 at 4:10 PM
Edited Dec 26, 2011 at 4:11 PM



Okay, so I'm successfully overridden the default admin theme and modifying and overriding files that are stored within the "TheAdmin" is easy (minus the lack of shape tracing of course).

I ran into an issue today though...  I want to create a custom Dashboard for the admin area.  I found the index.cshtml file in Core/Dashboard/Views/Admin/Index.cshtml


I've tried

I've made sure to include the web.config file in the views folder as I've seen elsewhere that missing it can create some havoc.

Any ideas?

Dec 27, 2011 at 2:37 AM
Edited Dec 27, 2011 at 4:30 AM

Okay, after doing some more research, it appears that I may not be able to override index.cshtml in a theme and instead I should look to build a module instead.  I started by creating a 
MyDashboard module and copying the code from the Dashboard module into it, then modifying it (specifically the index.cshtml file), disabling (via the command line) the Dashboard module and enabling the MyDashboard Module.  Unfortunately it appears that there is some coding (hard coding?) else where that is specifcally requesting the Orchard.Core.Dashboard and even more specifically the Orchard.Core.Dashboard.Controllers.AdminController.cs

I'm guessing this is the right track but frankly I'm still very fuzzy on the Controllers / Routes and how namespace and folder naming play into Orchards ability to find them/use them.  I'm also a little stuck on how Dashboard module gets used as the default view in the admin section of the website.

Okay got it figured out.  creating a module and taking control of the /admin in the controller was the appropriate action. 

Dec 27, 2011 at 4:30 AM


Okay got it figured out.  creating a module and taking control of the /admin in the controller was the appropriate action. 

May 23, 2013 at 5:25 PM
Put Index.html to YourSiteTheme\Views, not in TheAdmin theme
Apr 4, 2014 at 5:59 PM
someone solved this in the easy "override" way?
Apr 4, 2014 at 6:08 PM
I solved coping the new index in this path: /themes/mytheme/views/dashboard/admin/index.cshtml
thx corecomps and mnazarov!