This project is read-only.

Shape Tracing / Alternates in Admin Dashboard

Topics: Customizing Orchard
Nov 19, 2013 at 4:54 PM
Is it possible to use Shape Tracing and Alternates in Admin Dashboard. If so how?
Nov 19, 2013 at 9:17 PM
You cannot turn on shape tracing in the Admin area. You can, however, manually create alternates. However, in order to use them you need some sort of IThemeSelector that has a higher priority. Essentially, you are going to create another Admin theme that takes over for the parts you want to customize. OneStop.Admin I think is one theme that shows how to do this - it overrides the front page Admin (~/Admin/Index) to show you how you can create these manual alternates. Raptor.DetailAdmin is another theme that overrides "TheAdmin" theme and has tons of .cshtml views to play around with.
Nov 20, 2013 at 2:26 AM
remesq, I have a IThemeSelector that loads at a higher priority and works for the index. I'm trying to override the PublishLater part for blog posts. I created a Parts.PublishLater-BlogPost.cshtml in the views folder but it doesn't load. Am I on the right track with the PublishLater part? Thanks
Nov 20, 2013 at 2:51 PM
Edited Nov 20, 2013 at 2:51 PM
for those who follow in this journey:
<!--to remove this works--> in custom AdminTheme
<Match ContentType="BlogPost">
  <Place Parts_Common_Date_Edit="-"/>
  <Place Parts_PublishLater_Edit="-"/>
<!--to override this works--> Parts_Common_Date_Edit.cshtml
<!--to override this does NOT work--> Parts_PublishLater_Edit.cshtml
Nov 20, 2013 at 5:40 PM
I don't even see a Parts.PublishLater-BlogPost.cshtml file in the Orchard.Blogs module or the Orchard.PublishLater module for you to override. Take a look at Raptor.DetailAdmin - its a theme by PSenechal that overrides TheAdmin stock theme in Orchard.

In the Raptor.DetailAdmin he overrides many (if not all) the basic Admin .chsmtl files. He also has a folder under ~/Views for Orchard.Workflow which appears to override the themes in that module that appear in the Admin. You should check it out and maybe mimic the behavior with the Orchard.Blog or Orchard.PublishLater module views for Admin.

I hope that helps. Sorry if it doesn't.
Nov 20, 2013 at 5:55 PM
If I understand orchard alternates Parts.PublishLater-BlogPost.cshtml should override the PublishLater Part Only for a BlogPost content type.

I did look through Raptor.DetailAdmin and tried to mimic for Blogs to no avail. I'll update as I resolve.